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
diff --git a/lib/VMCore/DebugInfo.cpp b/lib/VMCore/DebugInfo.cpp
index 4697fde..e56ab0f 100644
--- a/lib/VMCore/DebugInfo.cpp
+++ b/lib/VMCore/DebugInfo.cpp
@@ -993,7 +993,8 @@
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);