Fixed debug info for globals in D2.

This commit is contained in:
Tomas Lindquist Olsen 2009-02-26 18:02:13 +01:00
parent 886a66f4e0
commit 7ef533b136

View file

@ -364,7 +364,11 @@ static llvm::DICompositeType dwarfCompositeType(Type* type, llvm::DICompileUnit
static llvm::DIGlobalVariable dwarfGlobalVariable(LLGlobalVariable* ll, VarDeclaration* vd)
{
#if DMDV2
assert(vd->isDataseg() || (vd->storage_class & (STCconst | STCinvariant) && vd->init));
#else
assert(vd->isDataseg());
#endif
llvm::DICompileUnit compileUnit = DtoDwarfCompileUnit(gIR->dmodule);
return gIR->difactory.CreateGlobalVariable(