summaryrefslogtreecommitdiffstats
path: root/llvm/tools/dsymutil
diff options
context:
space:
mode:
authorJonas Devlieghere <jonas@devlieghere.com>2019-05-24 21:11:28 +0000
committerJonas Devlieghere <jonas@devlieghere.com>2019-05-24 21:11:28 +0000
commit0da8160df354f50bffe339d6f2a83f9bf0049cd4 (patch)
treecb7469e6262f9765fb93afe812629ae382f61a55 /llvm/tools/dsymutil
parentde47d66191e50e8a741ed551c25d60bbf86da5e4 (diff)
downloadbcm5719-llvm-0da8160df354f50bffe339d6f2a83f9bf0049cd4.tar.gz
bcm5719-llvm-0da8160df354f50bffe339d6f2a83f9bf0049cd4.zip
[dwarfdump] Add flag to limit the number of parents DIEs
This adds `-parent-recurse-depth` which limits the number of parent DIEs being dumped. Differential revision: https://reviews.llvm.org/D62359 llvm-svn: 361671
Diffstat (limited to 'llvm/tools/dsymutil')
-rw-r--r--llvm/tools/dsymutil/DwarfLinker.cpp18
1 files changed, 10 insertions, 8 deletions
diff --git a/llvm/tools/dsymutil/DwarfLinker.cpp b/llvm/tools/dsymutil/DwarfLinker.cpp
index 79e3437a04d..be8bcc648ad 100644
--- a/llvm/tools/dsymutil/DwarfLinker.cpp
+++ b/llvm/tools/dsymutil/DwarfLinker.cpp
@@ -227,7 +227,7 @@ void DwarfLinker::reportWarning(const Twine &Warning, const DebugMapObject &DMO,
return;
DIDumpOptions DumpOpts;
- DumpOpts.RecurseDepth = 0;
+ DumpOpts.ChildRecurseDepth = 0;
DumpOpts.Verbose = Options.Verbose;
WithColor::note() << " in DIE:\n";
@@ -649,7 +649,7 @@ unsigned DwarfLinker::shouldKeepVariableDIE(RelocationManager &RelocMgr,
if (Options.Verbose) {
DIDumpOptions DumpOpts;
- DumpOpts.RecurseDepth = 0;
+ DumpOpts.ChildRecurseDepth = 0;
DumpOpts.Verbose = Options.Verbose;
DIE.dump(outs(), 8 /* Indent */, DumpOpts);
}
@@ -685,7 +685,7 @@ unsigned DwarfLinker::shouldKeepSubprogramDIE(
if (Options.Verbose) {
DIDumpOptions DumpOpts;
- DumpOpts.RecurseDepth = 0;
+ DumpOpts.ChildRecurseDepth = 0;
DumpOpts.Verbose = Options.Verbose;
DIE.dump(outs(), 8 /* Indent */, DumpOpts);
}
@@ -2096,8 +2096,10 @@ void DwarfLinker::DIECloner::copyAbbrev(
Linker.AssignAbbrev(Copy);
}
-uint32_t DwarfLinker::DIECloner::hashFullyQualifiedName(
- DWARFDie DIE, CompileUnit &U, const DebugMapObject &DMO, int RecurseDepth) {
+uint32_t
+DwarfLinker::DIECloner::hashFullyQualifiedName(DWARFDie DIE, CompileUnit &U,
+ const DebugMapObject &DMO,
+ int ChildRecurseDepth) {
const char *Name = nullptr;
DWARFUnit *OrigUnit = &U.getOrigUnit();
CompileUnit *CU = &U;
@@ -2131,13 +2133,13 @@ uint32_t DwarfLinker::DIECloner::hashFullyQualifiedName(
// FIXME: dsymutil-classic compatibility. Ignore modules.
CU->getOrigUnit().getDIEAtIndex(CU->getInfo(Idx).ParentIdx).getTag() ==
dwarf::DW_TAG_module)
- return djbHash(Name ? Name : "", djbHash(RecurseDepth ? "" : "::"));
+ return djbHash(Name ? Name : "", djbHash(ChildRecurseDepth ? "" : "::"));
DWARFDie Die = OrigUnit->getDIEAtIndex(CU->getInfo(Idx).ParentIdx);
return djbHash(
(Name ? Name : ""),
djbHash((Name ? "::" : ""),
- hashFullyQualifiedName(Die, *CU, DMO, ++RecurseDepth)));
+ hashFullyQualifiedName(Die, *CU, DMO, ++ChildRecurseDepth)));
}
static uint64_t getDwoId(const DWARFDie &CUDie, const DWARFUnit &Unit) {
@@ -2656,7 +2658,7 @@ bool DwarfLinker::link(const DebugMap &Map) {
if (Options.Verbose) {
outs() << "Input compilation unit:";
DIDumpOptions DumpOpts;
- DumpOpts.RecurseDepth = 0;
+ DumpOpts.ChildRecurseDepth = 0;
DumpOpts.Verbose = Options.Verbose;
CUDie.dump(outs(), 0, DumpOpts);
}
OpenPOWER on IntegriCloud