mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-01-25 00:53:14 +01:00
Fixed compile unit for debug info for array operations, fixed ticket #280 .
This commit is contained in:
@@ -95,10 +95,19 @@ static const llvm::StructType* getDwarfGlobalVariableType() {
|
||||
// get the module the symbol is in, or - for template instances - the current module
|
||||
static Module* getDefinedModule(Dsymbol* s)
|
||||
{
|
||||
if (!DtoIsTemplateInstance(s))
|
||||
return s->getModule();
|
||||
else
|
||||
return gIR->dmodule;
|
||||
// templates are defined in current module
|
||||
if (DtoIsTemplateInstance(s))
|
||||
{
|
||||
return gIR->dmodule;
|
||||
}
|
||||
// array operations as well
|
||||
else if (FuncDeclaration* fd = s->isFuncDeclaration())
|
||||
{
|
||||
if (fd->isArrayOp)
|
||||
return gIR->dmodule;
|
||||
}
|
||||
// otherwise use the symbol's module
|
||||
return s->getModule();
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
Reference in New Issue
Block a user