# HG changeset patch # User Tomas Lindquist Olsen # Date 1235667733 -3600 # Node ID ff22650d0ca3e305c9fa34f7f5b6bae4398b3873 # Parent 4f12ec3216cf32ea3764dc6a310b00d181313e70 Fixed debug info for globals in D2. diff -r 4f12ec3216cf -r ff22650d0ca3 gen/todebug.cpp --- a/gen/todebug.cpp Thu Feb 26 15:51:19 2009 +0100 +++ b/gen/todebug.cpp Thu Feb 26 18:02:13 2009 +0100 @@ -364,7 +364,11 @@ 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(