Only print out the tag if it's there.
authorBill Wendling <isanbard@gmail.com>
Thu, 28 Jun 2012 02:17:58 +0000 (02:17 +0000)
committerBill Wendling <isanbard@gmail.com>
Thu, 28 Jun 2012 02:17:58 +0000 (02:17 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159328 91177308-0d34-0410-b5e6-96231b3b80d8

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