Pretty-printer: Paper over an ambiguity between line table entries
authorAdrian Prantl <aprantl@apple.com>
Thu, 2 Oct 2014 16:42:13 +0000 (16:42 +0000)
committerAdrian Prantl <aprantl@apple.com>
Thu, 2 Oct 2014 16:42:13 +0000 (16:42 +0000)
and tagged mdnodes.

fixes http://llvm.org/bugs/show_bug.cgi?id=21131

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@218885 91177308-0d34-0410-b5e6-96231b3b80d8

lib/IR/DebugInfo.cpp

index 206d04e3749f4581464ff5a4ffe1329b74a2c3a1..2226dd63be654eb8c372d58f4d338dc65233dfb1 100644 (file)
@@ -1460,7 +1460,9 @@ void DIExpression::printInternal(raw_ostream &OS) const {
       break;
     }
     default:
       break;
     }
     default:
-      break;
+      // Else bail out early. This may be a line table entry.
+      OS << "Unknown]";
+      return;
     }
     OS << "]";
   }
     }
     OS << "]";
   }