[opengtl-commits] [168] fix the remaining test, return a null llvm module if there is no module data ( I am unsure yet if it doesn't hide a problem)

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


Revision: 168
Author:   cyrille
Date:     2008-05-19 10:37:36 +0200 (Mon, 19 May 2008)

Log Message:
-----------
fix the remaining test, return a null llvm module if there is no module data (I am unsure yet if it doesn't hide a problem)

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


Modified: trunk/OpenGTL/OpenGTL/GTLCore/GenerationContext_p.cpp
===================================================================
--- trunk/OpenGTL/OpenGTL/GTLCore/GenerationContext_p.cpp	2008-05-19 07:26:03 UTC (rev 167)
+++ trunk/OpenGTL/OpenGTL/GTLCore/GenerationContext_p.cpp	2008-05-19 08:37:36 UTC (rev 168)
@@ -20,6 +20,7 @@
 #include "GenerationContext_p.h"
 
 #include "ModuleData_p.h"
+#include "Debug.h"
 
 using namespace GTLCore;
 
@@ -46,6 +47,8 @@
 
 llvm::Module* GenerationContext::llvmModule()
 {
+  if( not m_module ) return 0;
+  GTL_ASSERT(m_module);
   return m_module->llvmModule();
 }
 


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