OSDN Git Service

Add a convenience overload of DWARFDie::dump() for debugging purposes.
authorAdrian Prantl <aprantl@apple.com>
Wed, 16 Aug 2017 17:43:01 +0000 (17:43 +0000)
committerAdrian Prantl <aprantl@apple.com>
Wed, 16 Aug 2017 17:43:01 +0000 (17:43 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311026 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/DebugInfo/DWARF/DWARFDie.h
lib/DebugInfo/DWARF/DWARFDie.cpp

index b216491..e28cc6c 100644 (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
index 09c0044..42e014f 100644 (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);