summaryrefslogtreecommitdiff
path: root/lib/ExecutionEngine
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2010-01-05 20:07:06 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2010-01-05 20:07:06 +0000
commit11acaa374cdcebb161bf0de5f244265d78a749c1 (patch)
tree6150e8c34a88c68bfaa4041f914b3d1628015946 /lib/ExecutionEngine
parent13be48701d09891e7945f9522d622053e1b61d1a (diff)
downloadllvm-11acaa374cdcebb161bf0de5f244265d78a749c1.tar.gz
llvm-11acaa374cdcebb161bf0de5f244265d78a749c1.tar.bz2
llvm-11acaa374cdcebb161bf0de5f244265d78a749c1.tar.xz
Convert a ton of simple integer type equality tests to the new predicate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92760 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/ExecutionEngine')
-rw-r--r--lib/ExecutionEngine/JIT/JIT.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/ExecutionEngine/JIT/JIT.cpp b/lib/ExecutionEngine/JIT/JIT.cpp
index 3eafe5f0f2..f8165ce223 100644
--- a/lib/ExecutionEngine/JIT/JIT.cpp
+++ b/lib/ExecutionEngine/JIT/JIT.cpp
@@ -414,7 +414,7 @@ GenericValue JIT::runFunction(Function *F,
if (RetTy == Type::getInt32Ty(F->getContext()) || RetTy->isVoidTy()) {
switch (ArgValues.size()) {
case 3:
- if (FTy->getParamType(0) == Type::getInt32Ty(F->getContext()) &&
+ if (FTy->getParamType(0)->isInteger(32) &&
isa<PointerType>(FTy->getParamType(1)) &&
isa<PointerType>(FTy->getParamType(2))) {
int (*PF)(int, char **, const char **) =
@@ -429,7 +429,7 @@ GenericValue JIT::runFunction(Function *F,
}
break;
case 2:
- if (FTy->getParamType(0) == Type::getInt32Ty(F->getContext()) &&
+ if (FTy->getParamType(0)->isInteger(32) &&
isa<PointerType>(FTy->getParamType(1))) {
int (*PF)(int, char **) = (int(*)(int, char **))(intptr_t)FPtr;
@@ -442,7 +442,7 @@ GenericValue JIT::runFunction(Function *F,
break;
case 1:
if (FTy->getNumParams() == 1 &&
- FTy->getParamType(0) == Type::getInt32Ty(F->getContext())) {
+ FTy->getParamType(0)->isInteger(32)) {
GenericValue rv;
int (*PF)(int) = (int(*)(int))(intptr_t)FPtr;
rv.IntVal = APInt(32, PF(ArgValues[0].IntVal.getZExtValue()));