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 | f012705c7e4ca8cf90b6b734ce1d5355daca5ba5 (patch) | |
tree | d1bcdd1cfc5ddc28894a9b9d6cbb2875d922e437 /lib/ExecutionEngine/JIT/JIT.cpp | |
parent | 804272c8d6fd960c47c8cbc1603aba3fe5a65ea8 (diff) | |
download | external_llvm-f012705c7e4ca8cf90b6b734ce1d5355daca5ba5.zip external_llvm-f012705c7e4ca8cf90b6b734ce1d5355daca5ba5.tar.gz external_llvm-f012705c7e4ca8cf90b6b734ce1d5355daca5ba5.tar.bz2 |
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/ExecutionEngine/JIT/JIT.cpp')
-rw-r--r-- | lib/ExecutionEngine/JIT/JIT.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/ExecutionEngine/JIT/JIT.cpp b/lib/ExecutionEngine/JIT/JIT.cpp index ebc2567..3eafe5f 100644 --- a/lib/ExecutionEngine/JIT/JIT.cpp +++ b/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 |