diff options
author | Devang Patel <dpatel@apple.com> | 2009-12-08 15:01:35 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2009-12-08 15:01:35 +0000 |
commit | 018b66038c73bebc81f8a26b0462b85e7ccedba7 (patch) | |
tree | f04a0fca3ef11188ca8bda1cca915f3ffa8d69a0 /lib | |
parent | 69cee6151df07c6fc8c1e4647a87e3ff78752e88 (diff) | |
download | external_llvm-018b66038c73bebc81f8a26b0462b85e7ccedba7.zip external_llvm-018b66038c73bebc81f8a26b0462b85e7ccedba7.tar.gz external_llvm-018b66038c73bebc81f8a26b0462b85e7ccedba7.tar.bz2 |
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
Diffstat (limited to 'lib')
-rw-r--r-- | lib/CodeGen/AsmPrinter/DwarfDebug.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp index f4f6fce..f32dea9 100644 --- a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp +++ b/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); |