Only print out the tag if it's there.
[oota-llvm.git] / lib / VMCore / DebugInfo.cpp
index 4697fdecf3ebc82c40c3d5b747516fb15228b983..e56ab0f2b8fc8271fa653b760186dae87d29e1dd 100644 (file)
@@ -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);