summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2009-12-08 15:01:35 +0000
committerDevang Patel <dpatel@apple.com>2009-12-08 15:01:35 +0000
commit7d723ec70d90244e75e10a7f550c497a37d2a18e (patch)
tree51996a51a240c3ec8a40a862b5c258a8c53c5b42 /llvm/lib/CodeGen
parentba8451b2435fab60ce795d7e8af8f5aab6f47db2 (diff)
downloadbcm5719-llvm-7d723ec70d90244e75e10a7f550c497a37d2a18e.tar.gz
bcm5719-llvm-7d723ec70d90244e75e10a7f550c497a37d2a18e.zip
Do not try to push dead variable's debug info into namespace info.
llvm-svn: 90857
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
index f4f6fce4577..f32dea9ebf2 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
@@ -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);
OpenPOWER on IntegriCloud