diff options
author | David Blaikie <dblaikie@gmail.com> | 2015-11-12 01:57:33 +0000 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2015-11-12 01:57:33 +0000 |
commit | 704f2137a403b3fbfe1e049ff21a2cd70e185c40 (patch) | |
tree | 3612cfd067a7a3e740b06f2ba570820dfc97297c /lib/DebugInfo/DWARF/DWARFContext.cpp | |
parent | c2e7b3e49549cc306a36a052b12b7b0fe0fb45b6 (diff) |
dwarfdump: Add error checking to fix the buildbots/correctness
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252845 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/DebugInfo/DWARF/DWARFContext.cpp')
-rw-r--r-- | lib/DebugInfo/DWARF/DWARFContext.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/DebugInfo/DWARF/DWARFContext.cpp b/lib/DebugInfo/DWARF/DWARFContext.cpp index d6ed6f84207..ac92a632b58 100644 --- a/lib/DebugInfo/DWARF/DWARFContext.cpp +++ b/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) { |