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/ExecutionEngine/JIT/JIT.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/ExecutionEngine/JIT/JIT.cpp')
| -rw-r--r-- | llvm/lib/ExecutionEngine/JIT/JIT.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/llvm/lib/ExecutionEngine/JIT/JIT.cpp b/llvm/lib/ExecutionEngine/JIT/JIT.cpp index ebc25677438..3eafe5f0f29 100644 --- a/llvm/lib/ExecutionEngine/JIT/JIT.cpp +++ b/llvm/lib/ExecutionEngine/JIT/JIT.cpp @@ -411,8 +411,7 @@ GenericValue JIT::runFunction(Function *F, // Handle some common cases first. These cases correspond to common `main' // prototypes. - if (RetTy == Type::getInt32Ty(F->getContext()) || - RetTy == Type::getVoidTy(F->getContext())) { + if (RetTy == Type::getInt32Ty(F->getContext()) || RetTy->isVoidTy()) { switch (ArgValues.size()) { case 3: if (FTy->getParamType(0) == Type::getInt32Ty(F->getContext()) && @@ -548,7 +547,7 @@ GenericValue JIT::runFunction(Function *F, "", StubBB); TheCall->setCallingConv(F->getCallingConv()); TheCall->setTailCall(); - if (TheCall->getType() != Type::getVoidTy(F->getContext())) + if (!TheCall->getType()->isVoidTy()) // Return result of the call. ReturnInst::Create(F->getContext(), TheCall, StubBB); else |

