diff options
Diffstat (limited to 'llvm/lib/CodeGen/IntrinsicLowering.cpp')
-rw-r--r-- | llvm/lib/CodeGen/IntrinsicLowering.cpp | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/llvm/lib/CodeGen/IntrinsicLowering.cpp b/llvm/lib/CodeGen/IntrinsicLowering.cpp index 8cbd8bcaeabb..4461a235d6c1 100644 --- a/llvm/lib/CodeGen/IntrinsicLowering.cpp +++ b/llvm/lib/CodeGen/IntrinsicLowering.cpp @@ -50,14 +50,6 @@ static CallInst *ReplaceCallWith(const char *NewFn, CallInst *CI, return NewCI; } -// VisualStudio defines setjmp as _setjmp -#if defined(_MSC_VER) && defined(setjmp) && \ - !defined(setjmp_undefined_for_msvc) -# pragma push_macro("setjmp") -# undef setjmp -# define setjmp_undefined_for_msvc -#endif - /// Emit the code to lower bswap of V before the specified instruction IP. static Value *LowerBSWAP(LLVMContext &Context, Value *V, Instruction *IP) { assert(V->getType()->isIntOrIntVectorTy() && "Can't bswap a non-integer type!"); @@ -254,34 +246,6 @@ void IntrinsicLowering::LowerIntrinsicCall(CallInst *CI) { break; } - // 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 - // by the lowerinvoke pass. In both cases, the right thing to do is to - // convert the call to an explicit setjmp or longjmp call. - case Intrinsic::setjmp: { - Value *V = ReplaceCallWith("setjmp", CI, CS.arg_begin(), CS.arg_end(), - Type::getInt32Ty(Context)); - if (!CI->getType()->isVoidTy()) - CI->replaceAllUsesWith(V); - break; - } - case Intrinsic::sigsetjmp: - if (!CI->getType()->isVoidTy()) - CI->replaceAllUsesWith(Constant::getNullValue(CI->getType())); - break; - - case Intrinsic::longjmp: { - ReplaceCallWith("longjmp", CI, CS.arg_begin(), CS.arg_end(), - Type::getVoidTy(Context)); - break; - } - - case Intrinsic::siglongjmp: { - // Insert the call to abort - ReplaceCallWith("abort", CI, CS.arg_end(), CS.arg_end(), - Type::getVoidTy(Context)); - break; - } case Intrinsic::ctpop: CI->replaceAllUsesWith(LowerCTPOP(Context, CI->getArgOperand(0), CI)); break; |