Do not try to push dead variable's debug info into namespace info.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90857 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Devang Patel
2009-12-08 15:01:35 +00:00
parent 69cee6151d
commit 018b66038c
2 changed files with 23 additions and 3 deletions

View File

@ -1837,9 +1837,11 @@ void DwarfDebug::beginModule(Module *M, MachineModuleInfo *mmi) {
constructGlobalVariableDIE(*I);
else if (GVContext.isNameSpace()) {
DIE *GVDie = createGlobalVariableDIE(ModuleCU, GV);
DINameSpace NS(GVContext.getNode());
DIE *NDie = getOrCreateNameSpace(NS);
NDie->addChild(GVDie);
if (GVDie) {
DINameSpace NS(GVContext.getNode());
DIE *NDie = getOrCreateNameSpace(NS);
NDie->addChild(GVDie);
}
}
else
ScopedGVs.push_back(*I);