mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 11:13:28 +01:00
llvm-dwarfdump: Sink the handling of ShowChildren into DWARFDie::dump(). NFC.
llvm-svn: 313560
This commit is contained in:
parent
2623a6b0e7
commit
15d7a4948c
@ -222,8 +222,6 @@ void DWARFContext::dump(
|
||||
|
||||
Optional<uint64_t> DumpOffset;
|
||||
uint64_t DumpType = DumpOpts.DumpType;
|
||||
unsigned RecDepth =
|
||||
DumpOpts.ShowChildren ? std::numeric_limits<unsigned>::max() : 0;
|
||||
|
||||
StringRef Extension = sys::path::extension(DObj->getFileName());
|
||||
bool IsDWO = (Extension == ".dwo") || (Extension == ".dwp");
|
||||
@ -261,7 +259,7 @@ void DWARFContext::dump(
|
||||
if (shouldDump(IsExplicit, Name, DIDT_ID_DebugInfo, Section.Data)) {
|
||||
for (const auto &CU : CUs)
|
||||
if (DumpOffset)
|
||||
CU->getDIEForOffset(DumpOffset.getValue()).dump(OS, RecDepth);
|
||||
CU->getDIEForOffset(DumpOffset.getValue()).dump(OS, 0, 0, DumpOpts);
|
||||
else
|
||||
CU->dump(OS, DumpOpts);
|
||||
}
|
||||
@ -278,7 +276,7 @@ void DWARFContext::dump(
|
||||
for (const auto &TUS : TUSections)
|
||||
for (const auto &TU : TUS)
|
||||
if (DumpOffset)
|
||||
TU->getDIEForOffset(*DumpOffset).dump(OS, RecDepth);
|
||||
TU->getDIEForOffset(*DumpOffset).dump(OS, 0, 0, DumpOpts);
|
||||
else
|
||||
TU->dump(OS, DumpOpts);
|
||||
};
|
||||
|
@ -374,6 +374,7 @@ void DWARFDie::dump(raw_ostream &OS, unsigned RecurseDepth, unsigned Indent,
|
||||
DWARFDataExtractor debug_info_data = U->getDebugInfoExtractor();
|
||||
const uint32_t Offset = getOffset();
|
||||
uint32_t offset = Offset;
|
||||
RecurseDepth += DumpOpts.ShowChildren ? 1 : 0;
|
||||
|
||||
if (debug_info_data.isValidOffset(offset)) {
|
||||
uint32_t abbrCode = debug_info_data.getULEB128(&offset);
|
||||
|
Loading…
Reference in New Issue
Block a user