summaryrefslogtreecommitdiffstats
path: root/llvm/lib/DebugInfo
diff options
context:
space:
mode:
authorEric Christopher <echristo@apple.com>2012-08-23 23:21:11 +0000
committerEric Christopher <echristo@apple.com>2012-08-23 23:21:11 +0000
commit9142ea7bec7c1bcb6f9c92dc9477b800a27f35cf (patch)
tree0e93b5defe74e003cd303362632d6d8c247a0fd1 /llvm/lib/DebugInfo
parent060b1638010a244df1be789e5f23d6a4fe28889c (diff)
downloadbcm5719-llvm-9142ea7bec7c1bcb6f9c92dc9477b800a27f35cf.tar.gz
bcm5719-llvm-9142ea7bec7c1bcb6f9c92dc9477b800a27f35cf.zip
Add an assert here in case parsing gave us a NULL compile unit.
llvm-svn: 162498
Diffstat (limited to 'llvm/lib/DebugInfo')
-rw-r--r--llvm/lib/DebugInfo/DWARFCompileUnit.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/DebugInfo/DWARFCompileUnit.cpp b/llvm/lib/DebugInfo/DWARFCompileUnit.cpp
index 4c98cb8a7f9..98dccac00a6 100644
--- a/llvm/lib/DebugInfo/DWARFCompileUnit.cpp
+++ b/llvm/lib/DebugInfo/DWARFCompileUnit.cpp
@@ -94,7 +94,9 @@ void DWARFCompileUnit::dump(raw_ostream &OS) {
<< " (next CU at " << format("0x%08x", getNextCompileUnitOffset())
<< ")\n";
- getCompileUnitDIE(false)->dump(OS, this, -1U);
+ const DWARFDebugInfoEntryMinimal *CU = getCompileUnitDIE(false);
+ assert(CU && "Null Compile Unit?");
+ CU->dump(OS, this, -1U);
}
const char *DWARFCompileUnit::getCompilationDir() {
OpenPOWER on IntegriCloud