[opengtl-commits] [224] fix arrays affectation

[ Thread Index | Date Index | More lists.tuxfamily.org/opengtl-commits Archives ]


Revision: 224
Author:   cyrille
Date:     2008-06-24 21:32:31 +0200 (Tue, 24 Jun 2008)

Log Message:
-----------
fix arrays affectation

Modified Paths:
--------------
    trunk/OpenGTL/OpenGTL/GTLCore/Visitor_p.cpp


Modified: trunk/OpenGTL/OpenGTL/GTLCore/Visitor_p.cpp
===================================================================
--- trunk/OpenGTL/OpenGTL/GTLCore/Visitor_p.cpp	2008-06-24 19:32:08 UTC (rev 223)
+++ trunk/OpenGTL/OpenGTL/GTLCore/Visitor_p.cpp	2008-06-24 19:32:31 UTC (rev 224)
@@ -168,18 +168,17 @@
     // Construct the body of the for loop
     llvm::BasicBlock* bodyBlock = new llvm::BasicBlock("bodyBlock");
     _generationContext.llvmFunction()->getBasicBlockList().push_back( bodyBlock);
-//     GTL_DEBUG( " value = " << *_pointer << " type = " << *_pointer->getType() );
-//     GTL_DEBUG( " value = " << *_value << " type = " << *_value->getType() );
+    GTL_DEBUG( " value = " << *_pointer << " type = " << *_pointer->getType() << " " << *_pointerType->embeddedType() << " " << *_pointerType );
+    GTL_DEBUG( " value = " << *_value << " type = " << *_value->getType() );
     const Visitor* visitor = Visitor::getVisitorFor( _pointerType->embeddedType() );
     llvm::BasicBlock* endBodyBlock = visitor->set( 
           _generationContext,
           bodyBlock, 
           _generationContext.codeGenerator()->accessArrayValue( bodyBlock, _pointer, index->get( _generationContext, bodyBlock  ) ),
           _pointerType->embeddedType(),
-          new llvm::LoadInst(
+          visitor->get( _generationContext, bodyBlock, 
                   _generationContext.codeGenerator()->accessArrayValue(
-                                    bodyBlock, _value, index->get( _generationContext, bodyBlock  ) ),
-                  "", bodyBlock ),
+                                    bodyBlock, _value, index->get( _generationContext, bodyBlock  ) ) ),
           _valueType->embeddedType() );
     
     // Create the for statement


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/