diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2010-01-05 13:12:22 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2010-01-05 13:12:22 +0000 |
commit | ccce8bae14a8539e7c9e8d694e2126dd30dc774f (patch) | |
tree | 56fd200381c4089dabdb97ce70eb595db1ae7bd4 /llvm/lib/CodeGen/IntrinsicLowering.cpp | |
parent | f22afe32f905c0b229d6e55e913e8584249747f3 (diff) | |
download | llvm-ccce8bae14a8539e7c9e8d694e2126dd30dc774f.zip llvm-ccce8bae14a8539e7c9e8d694e2126dd30dc774f.tar.gz llvm-ccce8bae14a8539e7c9e8d694e2126dd30dc774f.tar.bz2 |
Avoid going through the LLVMContext for type equality where it's safe to dereference the type pointer.
llvm-svn: 92726
Diffstat (limited to 'llvm/lib/CodeGen/IntrinsicLowering.cpp')
-rw-r--r-- | llvm/lib/CodeGen/IntrinsicLowering.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/IntrinsicLowering.cpp b/llvm/lib/CodeGen/IntrinsicLowering.cpp index 3585df2..9997a48 100644 --- a/llvm/lib/CodeGen/IntrinsicLowering.cpp +++ b/llvm/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: |