From 97a759249d6be2ad4f64b40f6bc14b0c3e77ef32 Mon Sep 17 00:00:00 2001 From: Bill Wendling Date: Thu, 28 Jun 2012 02:17:58 +0000 Subject: [PATCH] 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 --- lib/VMCore/DebugInfo.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/VMCore/DebugInfo.cpp b/lib/VMCore/DebugInfo.cpp index 4697fdecf3e..e56ab0f2b8f 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); -- 2.34.1