summaryrefslogtreecommitdiff
path: root/lib/VMCore/DebugInfo.cpp
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2012-06-28 02:17:58 +0000
committerBill Wendling <isanbard@gmail.com>2012-06-28 02:17:58 +0000
commit97a759249d6be2ad4f64b40f6bc14b0c3e77ef32 (patch)
treea90b73892b6ee754a5a5f9bfc28888b7960bf988 /lib/VMCore/DebugInfo.cpp
parentfc1c70a8a4f8bc7f4e51ece5b383966d602d89b7 (diff)
downloadllvm-97a759249d6be2ad4f64b40f6bc14b0c3e77ef32.tar.gz
llvm-97a759249d6be2ad4f64b40f6bc14b0c3e77ef32.tar.bz2
llvm-97a759249d6be2ad4f64b40f6bc14b0c3e77ef32.tar.xz
Only print out the tag if it's there.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159328 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore/DebugInfo.cpp')
-rw-r--r--lib/VMCore/DebugInfo.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/VMCore/DebugInfo.cpp b/lib/VMCore/DebugInfo.cpp
index 4697fdecf3..e56ab0f2b8 100644
--- a/lib/VMCore/DebugInfo.cpp
+++ b/lib/VMCore/DebugInfo.cpp
@@ -993,7 +993,8 @@ void DIDescriptor::dump() const {
void DIDescriptor::print(raw_ostream &OS) const {
if (!DbgNode) return;
- OS << "[" << dwarf::TagString(getTag()) << ']';
+ if (const char *Tag = dwarf::TagString(getTag()))
+ OS << "[ " << Tag << " ]";
if (this->isSubrange()) {
DISubrange(DbgNode).printInternal(OS);