summaryrefslogtreecommitdiffstats
path: root/llvm/lib/DebugInfo/DWARF/DWARFContext.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/DebugInfo/DWARF/DWARFContext.cpp')
-rw-r--r--llvm/lib/DebugInfo/DWARF/DWARFContext.cpp16
1 files changed, 4 insertions, 12 deletions
diff --git a/llvm/lib/DebugInfo/DWARF/DWARFContext.cpp b/llvm/lib/DebugInfo/DWARF/DWARFContext.cpp
index 2165d353ba0..a4195b75c47 100644
--- a/llvm/lib/DebugInfo/DWARF/DWARFContext.cpp
+++ b/llvm/lib/DebugInfo/DWARF/DWARFContext.cpp
@@ -163,20 +163,12 @@ void DWARFContext::dump(raw_ostream &OS, DIDumpType DumpType) {
if (DumpType == DIDT_All || DumpType == DIDT_CUIndex) {
OS << "\n.debug_cu_index contents:\n";
- DataExtractor CUIndexData(getCUIndexSection(), isLittleEndian(),
- savedAddressByteSize);
- DWARFUnitIndex CUIndex;
- if (CUIndex.parse(CUIndexData))
- CUIndex.dump(OS);
+ getCUIndex().dump(OS);
}
if (DumpType == DIDT_All || DumpType == DIDT_TUIndex) {
OS << "\n.debug_tu_index contents:\n";
- DataExtractor TUIndexData(getTUIndexSection(), isLittleEndian(),
- savedAddressByteSize);
- DWARFUnitIndex TUIndex;
- if (TUIndex.parse(TUIndexData))
- TUIndex.dump(OS);
+ getTUIndex().dump(OS);
}
if (DumpType == DIDT_All || DumpType == DIDT_LineDwo) {
@@ -280,7 +272,7 @@ const DWARFUnitIndex &DWARFContext::getCUIndex() {
DataExtractor CUIndexData(getCUIndexSection(), isLittleEndian(), 0);
- CUIndex = llvm::make_unique<DWARFUnitIndex>();
+ CUIndex = llvm::make_unique<DWARFUnitIndex>(DW_SECT_INFO);
CUIndex->parse(CUIndexData);
return *CUIndex;
}
@@ -291,7 +283,7 @@ const DWARFUnitIndex &DWARFContext::getTUIndex() {
DataExtractor TUIndexData(getTUIndexSection(), isLittleEndian(), 0);
- TUIndex = llvm::make_unique<DWARFUnitIndex>();
+ TUIndex = llvm::make_unique<DWARFUnitIndex>(DW_SECT_TYPES);
TUIndex->parse(TUIndexData);
return *TUIndex;
}
OpenPOWER on IntegriCloud