From 16de0136404b7e4703e528ae6f641c6fb7ee2f8b Mon Sep 17 00:00:00 2001 From: Bill Wendling Date: Tue, 5 May 2009 22:19:25 +0000 Subject: [PATCH] Add dump method to DIDescriptor. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@71028 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/Analysis/DebugInfo.h | 2 ++ lib/Analysis/DebugInfo.cpp | 6 +++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/include/llvm/Analysis/DebugInfo.h b/include/llvm/Analysis/DebugInfo.h index 6a0eb070c5b..f398fe43e05 100644 --- a/include/llvm/Analysis/DebugInfo.h +++ b/include/llvm/Analysis/DebugInfo.h @@ -74,6 +74,8 @@ namespace llvm { /// ValidDebugInfo - Return true if V represents valid debug info value. static bool ValidDebugInfo(Value *V, CodeGenOpt::Level OptLevel); + /// dump - print descriptor. + void dump() const; }; /// DIAnchor - A wrapper for various anchor descriptors. diff --git a/lib/Analysis/DebugInfo.cpp b/lib/Analysis/DebugInfo.cpp index 5d1f7cba161..181f3e9eff1 100644 --- a/lib/Analysis/DebugInfo.cpp +++ b/lib/Analysis/DebugInfo.cpp @@ -981,6 +981,11 @@ namespace llvm { } } +/// dump - print descriptor. +void DIDescriptor::dump() const { + cerr << " [" << dwarf::TagString(getTag()) << "]\n"; +} + /// dump - print compile unit. void DICompileUnit::dump() const { if (getLanguage()) @@ -1035,7 +1040,6 @@ void DIType::dump() const { /// dump - print basic type. void DIBasicType::dump() const { cerr << " [" << dwarf::AttributeEncodingString(getEncoding()) << "] "; - } /// dump - print derived type. -- 2.34.1