Add a convenience overload of DWARFDie::dump() for debugging purposes.

llvm-svn: 311026
This commit is contained in:
Adrian Prantl 2017-08-16 17:43:01 +00:00
parent 5a57b842cf
commit 3d523a657a
2 changed files with 6 additions and 0 deletions

View File

@ -123,6 +123,10 @@ public:
void dump(raw_ostream &OS, unsigned recurseDepth, unsigned indent = 0,
DIDumpOptions DumpOpts = DIDumpOptions()) const;
/// Convenience zero-argument overload for debugging.
LLVM_DUMP_METHOD void dump() const;
/// Extract the specified attribute from this DIE.
///
/// Extract an attribute value from this DIE only. This call doesn't look

View File

@ -377,6 +377,8 @@ void DWARFDie::dump(raw_ostream &OS, unsigned RecurseDepth, unsigned Indent,
}
}
LLVM_DUMP_METHOD void DWARFDie::dump() const { dump(llvm::errs(), 0); }
DWARFDie DWARFDie::getParent() const {
if (isValid())
return U->getParent(Die);