aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2009-09-04 23:59:07 +0000
committerDevang Patel <dpatel@apple.com>2009-09-04 23:59:07 +0000
commit905cf5e0bd4feaec00c45f44893afbbd1f02a149 (patch)
tree4a8a203639bbb865f6fd30c8b62262cf96f72eb6 /lib/CodeGen/AsmPrinter/DwarfDebug.cpp
parentbe5cded586e3a76f3175111019c51c99e38cf8e8 (diff)
Ignore malformed global variable debug info.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81055 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/AsmPrinter/DwarfDebug.cpp')
-rw-r--r--lib/CodeGen/AsmPrinter/DwarfDebug.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
index 0e55b54583..bc4333d9c1 100644
--- a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
+++ b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
@@ -1482,6 +1482,10 @@ void DwarfDebug::ConstructCompileUnit(MDNode *N) {
void DwarfDebug::ConstructGlobalVariableDIE(MDNode *N) {
DIGlobalVariable DI_GV(N);
+
+ // If debug information is malformed then ignore it.
+ if (DI_GV.Verify() == false)
+ return;
// Check for pre-existence.
DIE *&Slot = ModuleCU->getDieMapSlotFor(DI_GV.getNode());