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) {
DataExtractor CUIndexData(getCUIndexSection(), isLittleEndian(), 0);
- CUIndex = llvm::make_unique<DWARFUnitIndex>();
+ CUIndex = llvm::make_unique<DWARFUnitIndex>(DW_SECT_INFO);
CUIndex->parse(CUIndexData);
return *CUIndex;
}
DataExtractor TUIndexData(getTUIndexSection(), isLittleEndian(), 0);
- TUIndex = llvm::make_unique<DWARFUnitIndex>();
+ TUIndex = llvm::make_unique<DWARFUnitIndex>(DW_SECT_TYPES);
TUIndex->parse(TUIndexData);
return *TUIndex;
}
// relocation point already factors in the section address
// (actually applying the relocations will produce wrong results
// as the section address will be added twice).
- if (!L && dyn_cast<MachOObjectFile>(&Obj))
+ if (!L && isa<MachOObjectFile>(&Obj))
continue;
RelSecName = RelSecName.substr(