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);