diff gen/structs.cpp @ 947:9a10fa839dc5

Switch some getModule to getCompilationModule to make sure templates are emitted in the right module.
author Christian Kamm <kamm incasoftware de>
date Sun, 08 Feb 2009 18:51:32 +0100
parents 03d7c4aac654
children 8a70b4381369
line wrap: on
line diff
--- a/gen/structs.cpp	Sun Feb 08 16:50:22 2009 +0100
+++ b/gen/structs.cpp	Sun Feb 08 18:51:32 2009 +0100
@@ -533,11 +533,6 @@
     // set irstruct info
     irstruct->packed = ispacked;
 
-    // defined in this module?
-    bool thisModule = false;
-    if (sd->getModule() == gIR->dmodule)
-        thisModule = true;
-
     // methods, fields
     Array* arr = sd->members;
     for (int k=0; k < arr->dim; k++) {
@@ -647,7 +642,7 @@
     gIR->structs.pop_back();
 
     // emit typeinfo
-    if (sd->getModule() == gIR->dmodule && sd->llvmInternal != LLVMno_typeinfo)
+    if (sd->getCompilationModule() == gIR->dmodule && sd->llvmInternal != LLVMno_typeinfo)
         DtoTypeInfoOf(sd->type, false);
 }