diff --git a/gen/functions.cpp b/gen/functions.cpp index 2349f59c..41d4169e 100644 --- a/gen/functions.cpp +++ b/gen/functions.cpp @@ -646,7 +646,6 @@ void DtoDefineFunction(FuncDeclaration* fd) // debug info if (global.params.symdebug) { - Module* mo = fd->getModule(); fd->ir.irFunc->diSubprogram = DtoDwarfSubProgram(fd); } diff --git a/gen/llvmhelpers.cpp b/gen/llvmhelpers.cpp index 82016a10..0b748eba 100644 --- a/gen/llvmhelpers.cpp +++ b/gen/llvmhelpers.cpp @@ -1563,9 +1563,10 @@ bool mustDefineSymbol(Dsymbol* s) Module* M = DtoIsTemplateInstance(s); // if it's a template instance, check the instantiating module // not the module that defines the template - if (M) + if (M) { return M == gIR->dmodule; - return s->getModule() == gIR->dmodule; + } + return s->getCompilationModule() == gIR->dmodule; #endif } diff --git a/gen/structs.cpp b/gen/structs.cpp index a5e1da47..8da03dd0 100644 --- a/gen/structs.cpp +++ b/gen/structs.cpp @@ -533,11 +533,6 @@ void DtoResolveStruct(StructDeclaration* sd) // 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 @@ void DtoConstInitStruct(StructDeclaration* sd) 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); }