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/Transforms/IPO/MergeFunctions.cpp | |
parent | f22afe32f905c0b229d6e55e913e8584249747f3 (diff) | |
download | bcm5719-llvm-ccce8bae14a8539e7c9e8d694e2126dd30dc774f.tar.gz bcm5719-llvm-ccce8bae14a8539e7c9e8d694e2126dd30dc774f.zip |
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/Transforms/IPO/MergeFunctions.cpp')
-rw-r--r-- | llvm/lib/Transforms/IPO/MergeFunctions.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/IPO/MergeFunctions.cpp b/llvm/lib/Transforms/IPO/MergeFunctions.cpp index 7043871169d..fa8845b8428 100644 --- a/llvm/lib/Transforms/IPO/MergeFunctions.cpp +++ b/llvm/lib/Transforms/IPO/MergeFunctions.cpp @@ -498,7 +498,7 @@ static void ThunkGToF(Function *F, Function *G) { CallInst *CI = CallInst::Create(F, Args.begin(), Args.end(), "", BB); CI->setTailCall(); CI->setCallingConv(F->getCallingConv()); - if (NewG->getReturnType() == Type::getVoidTy(F->getContext())) { + if (NewG->getReturnType()->isVoidTy()) { ReturnInst::Create(F->getContext(), BB); } else if (CI->getType() != NewG->getReturnType()) { Value *BCI = new BitCastInst(CI, NewG->getReturnType(), "", BB); |