Mercurial > projects > ldc
comparison gen/todebug.cpp @ 998:ff22650d0ca3
Fixed debug info for globals in D2.
author | Tomas Lindquist Olsen <tomas.l.olsen@gmail.com> |
---|---|
date | Thu, 26 Feb 2009 18:02:13 +0100 |
parents | 8a70b4381369 |
children | f0b6549055ab 186d44690036 |
comparison
equal
deleted
inserted
replaced
997:4f12ec3216cf | 998:ff22650d0ca3 |
---|---|
362 | 362 |
363 ////////////////////////////////////////////////////////////////////////////////////////////////// | 363 ////////////////////////////////////////////////////////////////////////////////////////////////// |
364 | 364 |
365 static llvm::DIGlobalVariable dwarfGlobalVariable(LLGlobalVariable* ll, VarDeclaration* vd) | 365 static llvm::DIGlobalVariable dwarfGlobalVariable(LLGlobalVariable* ll, VarDeclaration* vd) |
366 { | 366 { |
367 #if DMDV2 | |
368 assert(vd->isDataseg() || (vd->storage_class & (STCconst | STCinvariant) && vd->init)); | |
369 #else | |
367 assert(vd->isDataseg()); | 370 assert(vd->isDataseg()); |
371 #endif | |
368 llvm::DICompileUnit compileUnit = DtoDwarfCompileUnit(gIR->dmodule); | 372 llvm::DICompileUnit compileUnit = DtoDwarfCompileUnit(gIR->dmodule); |
369 | 373 |
370 return gIR->difactory.CreateGlobalVariable( | 374 return gIR->difactory.CreateGlobalVariable( |
371 compileUnit, // context | 375 compileUnit, // context |
372 vd->mangle(), // name | 376 vd->mangle(), // name |