diff gen/llvmhelpers.cpp @ 946:1714836f2c0b

Mostly rewrite debug info generation in terms of llvm/Analysis/DebugInfo.h. Add getCompilationModule to Dsymbol and fix template compile unit decision code. Runtime compiles with -g again.
author Christian Kamm <kamm incasoftware de>
date Sun, 08 Feb 2009 16:50:22 +0100
parents 03d7c4aac654
children 9a10fa839dc5
line wrap: on
line diff
--- a/gen/llvmhelpers.cpp	Sun Feb 08 05:26:54 2009 +0100
+++ b/gen/llvmhelpers.cpp	Sun Feb 08 16:50:22 2009 +0100
@@ -974,7 +974,7 @@
         // do debug info
         if (global.params.symdebug)
         {
-            LLGlobalVariable* gv = DtoDwarfGlobalVariable(gvar, vd);
+            LLGlobalVariable* gv = DtoDwarfGlobalVariable(gvar, vd).getGV();
             // keep a reference so GDCE doesn't delete it !
             gIR->usedArray.push_back(llvm::ConstantExpr::getBitCast(gv, getVoidPtrType()));
         }
@@ -1557,7 +1557,7 @@
 
 bool mustDefineSymbol(Dsymbol* s)
 {
-#if 1
+#if 0
     return s->getModule() == gIR->dmodule || DtoIsTemplateInstance(s) != NULL;
 #else
     Module* M = DtoIsTemplateInstance(s);
@@ -1573,7 +1573,7 @@
 
 bool needsTemplateLinkage(Dsymbol* s)
 {
-#if 1
+#if 0
     return DtoIsTemplateInstance(s) != NULL;
 #else
     Module* M = DtoIsTemplateInstance(s);