[llvm] r236893 - Replace branch-to-unreachable with assertion.

David Blaikie dblaikie at gmail.com
Fri May 8 11:52:29 PDT 2015


Author: dblaikie
Date: Fri May  8 13:52:28 2015
New Revision: 236893

URL: http://llvm.org/viewvc/llvm-project?rev=236893&view=rev
Log:
Replace branch-to-unreachable with assertion.

Modified:
    llvm/trunk/lib/IR/Function.cpp

Modified: llvm/trunk/lib/IR/Function.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/Function.cpp?rev=236893&r1=236892&r2=236893&view=diff
==============================================================================
--- llvm/trunk/lib/IR/Function.cpp (original)
+++ llvm/trunk/lib/IR/Function.cpp Fri May  8 13:52:28 2015
@@ -490,10 +490,8 @@ static std::string getMangledTypeStr(Typ
     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++)





More information about the llvm-commits mailing list