diff options
author | Torok Edwin <edwintorok@gmail.com> | 2009-07-11 13:10:19 +0000 |
---|---|---|
committer | Torok Edwin <edwintorok@gmail.com> | 2009-07-11 13:10:19 +0000 |
commit | 7d696d80409aad20bb5da0fc4eccab941dd371d4 (patch) | |
tree | 948cd8ec42ea724903f0789140bdbfd4f11241dc /lib/CodeGen/IntrinsicLowering.cpp | |
parent | 238f5100c60ba69afc388a78a296606bb2e72dce (diff) |
Convert more assert(0)+abort() -> LLVM_UNREACHABLE,
and abort()/exit() -> llvm_report_error().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75363 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/IntrinsicLowering.cpp')
-rw-r--r-- | lib/CodeGen/IntrinsicLowering.cpp | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/lib/CodeGen/IntrinsicLowering.cpp b/lib/CodeGen/IntrinsicLowering.cpp index 64a5c9e699..9eacdfe4d5 100644 --- a/lib/CodeGen/IntrinsicLowering.cpp +++ b/lib/CodeGen/IntrinsicLowering.cpp @@ -17,6 +17,7 @@ #include "llvm/Type.h" #include "llvm/CodeGen/IntrinsicLowering.h" #include "llvm/Support/IRBuilder.h" +#include "llvm/Support/ErrorHandling.h" #include "llvm/Target/TargetData.h" #include "llvm/ADT/SmallVector.h" using namespace llvm; @@ -626,7 +627,7 @@ static void ReplaceFPIntrinsicWithCall(CallInst *CI, const char *Fname, const char *Dname, const char *LDname) { switch (CI->getOperand(1)->getType()->getTypeID()) { - default: assert(0 && "Invalid type in intrinsic"); abort(); + default: LLVM_UNREACHABLE( "Invalid type in intrinsic"); case Type::FloatTyID: ReplaceCallWith(Fname, CI, CI->op_begin() + 1, CI->op_end(), Type::FloatTy); @@ -652,13 +653,11 @@ void IntrinsicLowering::LowerIntrinsicCall(CallInst *CI) { switch (Callee->getIntrinsicID()) { case Intrinsic::not_intrinsic: - cerr << "Cannot lower a call to a non-intrinsic function '" - << Callee->getName() << "'!\n"; - abort(); + llvm_report_error("Cannot lower a call to a non-intrinsic function '"+ + Callee->getName() + "'!"); default: - cerr << "Error: Code generator does not support intrinsic function '" - << Callee->getName() << "'!\n"; - abort(); + llvm_report_error("Code generator does not support intrinsic function '"+ + Callee->getName()+"'!"); // The setjmp/longjmp intrinsics should only exist in the code if it was // never optimized (ie, right out of the CFE), or if it has been hacked on |