summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-03-09 04:48:35 +0000
committerChris Lattner <sabre@nondot.org>2010-03-09 04:48:35 +0000
commit54a687682191f417398aceb090a04d63ba079c35 (patch)
treee03f3ed05a5a5e2cbf6a0d4a4e9042e36e3f8f69 /llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
parent251787686b790c70c396dbef7d17e60ff4710793 (diff)
downloadbcm5719-llvm-54a687682191f417398aceb090a04d63ba079c35.tar.gz
bcm5719-llvm-54a687682191f417398aceb090a04d63ba079c35.zip
add some extra checks. I'm not sure why, but this does unbreak a
failure remaining on mainline. llvm-svn: 98046
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
index af651a71d98..9a534315bde 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
@@ -1365,6 +1365,7 @@ DIE *DwarfDebug::updateSubprogramScopeDIE(MDNode *SPNode) {
DIE *DwarfDebug::constructLexicalScopeDIE(DbgScope *Scope) {
MCSymbol *Start = Scope->getStartLabel();
MCSymbol *End = Scope->getEndLabel();
+ if (Start == 0) return 0;
assert(Start->isDefined() && "Invalid starting label for an inlined scope!");
assert(End->isDefined() && "Invalid end label for an inlined scope!");
@@ -1387,6 +1388,8 @@ DIE *DwarfDebug::constructLexicalScopeDIE(DbgScope *Scope) {
DIE *DwarfDebug::constructInlinedScopeDIE(DbgScope *Scope) {
MCSymbol *StartLabel = Scope->getStartLabel();
MCSymbol *EndLabel = Scope->getEndLabel();
+ if (StartLabel == 0) return 0;
+
assert(StartLabel->isDefined() &&
"Invalid starting label for an inlined scope!");
assert(EndLabel->isDefined() &&
OpenPOWER on IntegriCloud