From: Adrian Prantl Date: Wed, 16 Aug 2017 17:43:01 +0000 (+0000) Subject: Add a convenience overload of DWARFDie::dump() for debugging purposes. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4607019142cd764352cf9cdb4e4ead824b911d5d;p=llvm Add a convenience overload of DWARFDie::dump() for debugging purposes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311026 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/llvm/DebugInfo/DWARF/DWARFDie.h b/include/llvm/DebugInfo/DWARF/DWARFDie.h index b216491b615..e28cc6c1785 100644 --- a/include/llvm/DebugInfo/DWARF/DWARFDie.h +++ b/include/llvm/DebugInfo/DWARF/DWARFDie.h @@ -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 diff --git a/lib/DebugInfo/DWARF/DWARFDie.cpp b/lib/DebugInfo/DWARF/DWARFDie.cpp index 09c004453dd..42e014f87ff 100644 --- a/lib/DebugInfo/DWARF/DWARFDie.cpp +++ b/lib/DebugInfo/DWARF/DWARFDie.cpp @@ -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);