mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-07 11:26:02 +03:00
Fixed debug info for globals in D2.
This commit is contained in:
parent
886a66f4e0
commit
7ef533b136
1 changed files with 4 additions and 0 deletions
|
@ -364,7 +364,11 @@ static llvm::DICompositeType dwarfCompositeType(Type* type, llvm::DICompileUnit
|
||||||
|
|
||||||
static llvm::DIGlobalVariable dwarfGlobalVariable(LLGlobalVariable* ll, VarDeclaration* vd)
|
static llvm::DIGlobalVariable dwarfGlobalVariable(LLGlobalVariable* ll, VarDeclaration* vd)
|
||||||
{
|
{
|
||||||
|
#if DMDV2
|
||||||
|
assert(vd->isDataseg() || (vd->storage_class & (STCconst | STCinvariant) && vd->init));
|
||||||
|
#else
|
||||||
assert(vd->isDataseg());
|
assert(vd->isDataseg());
|
||||||
|
#endif
|
||||||
llvm::DICompileUnit compileUnit = DtoDwarfCompileUnit(gIR->dmodule);
|
llvm::DICompileUnit compileUnit = DtoDwarfCompileUnit(gIR->dmodule);
|
||||||
|
|
||||||
return gIR->difactory.CreateGlobalVariable(
|
return gIR->difactory.CreateGlobalVariable(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue