[opengtl-commits] [711] don't assert only one the basic block is non null but when it doesn' t have a terminator

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


Revision: 711
Author:   cyrille
Date:     2009-04-08 17:05:16 +0200 (Wed, 08 Apr 2009)

Log Message:
-----------
don't assert only one the basic block is non null but when it doesn't have a terminator

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


Modified: trunk/OpenGTL/OpenGTL/GTLCore/ExpressionGenerationContext_p.cpp
===================================================================
--- trunk/OpenGTL/OpenGTL/GTLCore/ExpressionGenerationContext_p.cpp	2009-04-08 15:03:53 UTC (rev 710)
+++ trunk/OpenGTL/OpenGTL/GTLCore/ExpressionGenerationContext_p.cpp	2009-04-08 15:05:16 UTC (rev 711)
@@ -20,6 +20,7 @@
 #include "ExpressionGenerationContext_p.h"
 
 #include "Debug.h"
+#include <llvm/BasicBlock.h>
 
 using namespace GTLCore;
 
@@ -37,6 +38,6 @@
 
 void ExpressionGenerationContext::setCurrentBasicBlock(llvm::BasicBlock* _bb)
 {
-  GTL_ASSERT( m_currentBasicBlock == 0 );
+  GTL_ASSERT( m_currentBasicBlock == 0 or m_currentBasicBlock->getTerminator() );
   m_currentBasicBlock = _bb;
 }


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