Replace branch-to-unreachable with assertion.
authorDavid Blaikie <dblaikie@gmail.com>
Fri, 8 May 2015 18:52:28 +0000 (18:52 +0000)
committerDavid Blaikie <dblaikie@gmail.com>
Fri, 8 May 2015 18:52:28 +0000 (18:52 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236893 91177308-0d34-0410-b5e6-96231b3b80d8

lib/IR/Function.cpp

index d896eea5803a759ad352fc2b36f78227b8d4e4b9..f312f711c60c2bef978e9a68d672c7ec61c3e0df 100644 (file)
@@ -490,10 +490,8 @@ static std::string getMangledTypeStr(Type* Ty) {
     Result += "a" + llvm::utostr(ATyp->getNumElements()) +
       getMangledTypeStr(ATyp->getElementType());
   } else if (StructType* STyp = dyn_cast<StructType>(Ty)) {
-    if (!STyp->isLiteral())
-      Result += STyp->getName();
-    else
-      llvm_unreachable("TODO: implement literal types");
+    assert(!STyp->isLiteral() && "TODO: implement literal types");
+    Result += STyp->getName();
   } else if (FunctionType* FT = dyn_cast<FunctionType>(Ty)) {
     Result += "f_" + getMangledTypeStr(FT->getReturnType());
     for (size_t i = 0; i < FT->getNumParams(); i++)