summaryrefslogtreecommitdiff
path: root/lib/DebugInfo/DWARFCompileUnit.cpp
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
commitfa76f22865a8ee2adf29fdd4087b0982b7aedaf2 (patch)
treed33cbc7724e396366ba357af53365d1305c0ed13 /lib/DebugInfo/DWARFCompileUnit.cpp
parentcbbd5b1d86e0d06c804f4cdd61e0676b2d2f5c85 (diff)
downloadllvm-fa76f22865a8ee2adf29fdd4087b0982b7aedaf2.tar.gz
llvm-fa76f22865a8ee2adf29fdd4087b0982b7aedaf2.tar.bz2
llvm-fa76f22865a8ee2adf29fdd4087b0982b7aedaf2.tar.xz
Add an assert here in case parsing gave us a NULL compile unit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@162498 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/DebugInfo/DWARFCompileUnit.cpp')
-rw-r--r--lib/DebugInfo/DWARFCompileUnit.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/DebugInfo/DWARFCompileUnit.cpp b/lib/DebugInfo/DWARFCompileUnit.cpp
index 4c98cb8a7f..98dccac00a 100644
--- a/lib/DebugInfo/DWARFCompileUnit.cpp
+++ b/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() {