[opengtl-commits] [380] initialize the count field of structures/arrays

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


Revision: 380
Author:   cyrille
Date:     2008-09-09 22:16:25 +0200 (Tue, 09 Sep 2008)

Log Message:
-----------
initialize the count field of structures/arrays

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-09-09 07:16:33 UTC (rev 379)
+++ trunk/OpenGTL/OpenGTL/GTLCore/Visitor_p.cpp	2008-09-09 20:16:25 UTC (rev 380)
@@ -252,6 +252,7 @@
 {
   GTL_ASSERT( _pointerType->dataType() == Type::ARRAY );
   GTL_DEBUG( _sizes.empty() );
+  CodeGenerator::setCountFieldOf( _currentBlock, _pointer, CodeGenerator::integerToConstant( 1 ) );
   if( not _sizes.empty())
   {
     llvm::Value* currentSize = _sizes.front();
@@ -450,6 +451,7 @@
                             pointerToValue( _generationContext, _currentBlock, _pointer, i ),
                             type, sizes, _allocatedInMemory );
   }
+  CodeGenerator::setCountFieldOf( _currentBlock, _pointer, CodeGenerator::integerToConstant( 1 ) );
   return _currentBlock;
 }
 


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