summaryrefslogtreecommitdiffstats
path: root/llvm/lib/DebugInfo/DWARF/DWARFDie.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/DebugInfo/DWARF/DWARFDie.cpp')
-rw-r--r--llvm/lib/DebugInfo/DWARF/DWARFDie.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/llvm/lib/DebugInfo/DWARF/DWARFDie.cpp b/llvm/lib/DebugInfo/DWARF/DWARFDie.cpp
index 64fa6e2c76a..a471d97d75d 100644
--- a/llvm/lib/DebugInfo/DWARF/DWARFDie.cpp
+++ b/llvm/lib/DebugInfo/DWARF/DWARFDie.cpp
@@ -475,8 +475,10 @@ void DWARFDie::dump(raw_ostream &OS, unsigned Indent,
const uint32_t Offset = getOffset();
uint32_t offset = Offset;
if (DumpOpts.ShowParents) {
- DumpOpts.ShowParents = false;
- Indent = dumpParentChain(getParent(), OS, Indent, DumpOpts);
+ DIDumpOptions ParentDumpOpts = DumpOpts;
+ ParentDumpOpts.ShowParents = false;
+ ParentDumpOpts.ShowChildren = false;
+ Indent = dumpParentChain(getParent(), OS, Indent, ParentDumpOpts);
}
if (debug_info_data.isValidOffset(offset)) {
@@ -510,8 +512,10 @@ void DWARFDie::dump(raw_ostream &OS, unsigned Indent,
DWARFDie child = getFirstChild();
if (DumpOpts.ShowChildren && DumpOpts.RecurseDepth > 0 && child) {
DumpOpts.RecurseDepth--;
+ DIDumpOptions ChildDumpOpts = DumpOpts;
+ ChildDumpOpts.ShowParents = false;
while (child) {
- child.dump(OS, Indent + 2, DumpOpts);
+ child.dump(OS, Indent + 2, ChildDumpOpts);
child = child.getSibling();
}
}
OpenPOWER on IntegriCloud