summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2015-11-12 01:57:33 +0000
committerDavid Blaikie <dblaikie@gmail.com>2015-11-12 01:57:33 +0000
commitee293c0aacce7ba27a99b3d8bcf765c8e1e9b5c3 (patch)
tree80b53bbfa8ebd597a6a7b90c10dfce20b86b9ead
parent6e9c4f7f0da160c94a1e9ac6cc5e083eae9f1b0d (diff)
downloadbcm5719-llvm-ee293c0aacce7ba27a99b3d8bcf765c8e1e9b5c3.tar.gz
bcm5719-llvm-ee293c0aacce7ba27a99b3d8bcf765c8e1e9b5c3.zip
dwarfdump: Add error checking to fix the buildbots/correctness
llvm-svn: 252845
-rw-r--r--llvm/lib/DebugInfo/DWARF/DWARFContext.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/DebugInfo/DWARF/DWARFContext.cpp b/llvm/lib/DebugInfo/DWARF/DWARFContext.cpp
index d6ed6f84207..ac92a632b58 100644
--- a/llvm/lib/DebugInfo/DWARF/DWARFContext.cpp
+++ b/llvm/lib/DebugInfo/DWARF/DWARFContext.cpp
@@ -161,8 +161,8 @@ void DWARFContext::dump(raw_ostream &OS, DIDumpType DumpType) {
DataExtractor CUIndexData(getCUIndexSection(), isLittleEndian(),
savedAddressByteSize);
DWARFUnitIndex CUIndex;
- CUIndex.parse(CUIndexData);
- CUIndex.dump(OS);
+ if (CUIndex.parse(CUIndexData))
+ CUIndex.dump(OS);
}
if (DumpType == DIDT_All || DumpType == DIDT_TUIndex) {
@@ -170,8 +170,8 @@ void DWARFContext::dump(raw_ostream &OS, DIDumpType DumpType) {
DataExtractor TUIndexData(getTUIndexSection(), isLittleEndian(),
savedAddressByteSize);
DWARFUnitIndex TUIndex;
- TUIndex.parse(TUIndexData);
- TUIndex.dump(OS);
+ if (TUIndex.parse(TUIndexData))
+ TUIndex.dump(OS);
}
if (DumpType == DIDT_All || DumpType == DIDT_LineDwo) {
OpenPOWER on IntegriCloud