summaryrefslogtreecommitdiff
path: root/lib/CodeGen/IntrinsicLowering.cpp
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2010-01-05 13:12:22 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2010-01-05 13:12:22 +0000
commitf012705c7e4ca8cf90b6b734ce1d5355daca5ba5 (patch)
treed1bcdd1cfc5ddc28894a9b9d6cbb2875d922e437 /lib/CodeGen/IntrinsicLowering.cpp
parent804272c8d6fd960c47c8cbc1603aba3fe5a65ea8 (diff)
downloadllvm-f012705c7e4ca8cf90b6b734ce1d5355daca5ba5.tar.gz
llvm-f012705c7e4ca8cf90b6b734ce1d5355daca5ba5.tar.bz2
llvm-f012705c7e4ca8cf90b6b734ce1d5355daca5ba5.tar.xz
Avoid going through the LLVMContext for type equality where it's safe to dereference the type pointer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92726 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/IntrinsicLowering.cpp')
-rw-r--r--lib/CodeGen/IntrinsicLowering.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/CodeGen/IntrinsicLowering.cpp b/lib/CodeGen/IntrinsicLowering.cpp
index 3585df2dca..9997a48442 100644
--- a/lib/CodeGen/IntrinsicLowering.cpp
+++ b/lib/CodeGen/IntrinsicLowering.cpp
@@ -349,12 +349,12 @@ void IntrinsicLowering::LowerIntrinsicCall(CallInst *CI) {
case Intrinsic::setjmp: {
Value *V = ReplaceCallWith("setjmp", CI, CI->op_begin() + 1, CI->op_end(),
Type::getInt32Ty(Context));
- if (CI->getType() != Type::getVoidTy(Context))
+ if (!CI->getType()->isVoidTy())
CI->replaceAllUsesWith(V);
break;
}
case Intrinsic::sigsetjmp:
- if (CI->getType() != Type::getVoidTy(Context))
+ if (!CI->getType()->isVoidTy())
CI->replaceAllUsesWith(Constant::getNullValue(CI->getType()));
break;
@@ -508,7 +508,7 @@ void IntrinsicLowering::LowerIntrinsicCall(CallInst *CI) {
}
case Intrinsic::flt_rounds:
// Lower to "round to the nearest"
- if (CI->getType() != Type::getVoidTy(Context))
+ if (!CI->getType()->isVoidTy())
CI->replaceAllUsesWith(ConstantInt::get(CI->getType(), 1));
break;
case Intrinsic::invariant_start: