[llvm] r311026 - Add a convenience overload of DWARFDie::dump() for debugging purposes.
Adrian Prantl via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 16 10:43:01 PDT 2017
Author: adrian
Date: Wed Aug 16 10:43:01 2017
New Revision: 311026
URL: http://llvm.org/viewvc/llvm-project?rev=311026&view=rev
Log:
Add a convenience overload of DWARFDie::dump() for debugging purposes.
Modified:
llvm/trunk/include/llvm/DebugInfo/DWARF/DWARFDie.h
llvm/trunk/lib/DebugInfo/DWARF/DWARFDie.cpp
Modified: llvm/trunk/include/llvm/DebugInfo/DWARF/DWARFDie.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo/DWARF/DWARFDie.h?rev=311026&r1=311025&r2=311026&view=diff
==============================================================================
--- llvm/trunk/include/llvm/DebugInfo/DWARF/DWARFDie.h (original)
+++ llvm/trunk/include/llvm/DebugInfo/DWARF/DWARFDie.h Wed Aug 16 10:43:01 2017
@@ -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
Modified: llvm/trunk/lib/DebugInfo/DWARF/DWARFDie.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/DWARF/DWARFDie.cpp?rev=311026&r1=311025&r2=311026&view=diff
==============================================================================
--- llvm/trunk/lib/DebugInfo/DWARF/DWARFDie.cpp (original)
+++ llvm/trunk/lib/DebugInfo/DWARF/DWARFDie.cpp Wed Aug 16 10:43:01 2017
@@ -377,6 +377,8 @@ void DWARFDie::dump(raw_ostream &OS, uns
}
}
+LLVM_DUMP_METHOD void DWARFDie::dump() const { dump(llvm::errs(), 0); }
+
DWARFDie DWARFDie::getParent() const {
if (isValid())
return U->getParent(Die);
More information about the llvm-commits
mailing list