summaryrefslogtreecommitdiffstats
path: root/llvm/lib/ExecutionEngine
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2010-01-05 21:05:54 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2010-01-05 21:05:54 +0000
commitd2564e3afb1d9fe42c4b092dfd0bcf472aa535e1 (patch)
tree779af716dfcdb72a3855bb1da70efb9a50da01d5 /llvm/lib/ExecutionEngine
parentfd7e42b65d7bd07eb956f2605216b9b3419263a9 (diff)
downloadbcm5719-llvm-d2564e3afb1d9fe42c4b092dfd0bcf472aa535e1.tar.gz
bcm5719-llvm-d2564e3afb1d9fe42c4b092dfd0bcf472aa535e1.zip
Move remaining stuff to the isInteger predicate.
llvm-svn: 92771
Diffstat (limited to 'llvm/lib/ExecutionEngine')
-rw-r--r--llvm/lib/ExecutionEngine/ExecutionEngine.cpp8
-rw-r--r--llvm/lib/ExecutionEngine/JIT/JIT.cpp2
2 files changed, 4 insertions, 6 deletions
diff --git a/llvm/lib/ExecutionEngine/ExecutionEngine.cpp b/llvm/lib/ExecutionEngine/ExecutionEngine.cpp
index 35e69229e74..c466400393e 100644
--- a/llvm/lib/ExecutionEngine/ExecutionEngine.cpp
+++ b/llvm/lib/ExecutionEngine/ExecutionEngine.cpp
@@ -356,7 +356,7 @@ int ExecutionEngine::runFunctionAsMain(Function *Fn,
}
// FALLS THROUGH
case 1:
- if (FTy->getParamType(0) != Type::getInt32Ty(Fn->getContext())) {
+ if (!FTy->getParamType(0)->isInteger(32)) {
llvm_report_error("Invalid type for first argument of main() supplied");
}
// FALLS THROUGH
@@ -618,13 +618,11 @@ GenericValue ExecutionEngine::getConstantValue(const Constant *C) {
GV.DoubleVal = GV.IntVal.bitsToDouble();
break;
case Type::FloatTyID:
- assert(DestTy == Type::getInt32Ty(DestTy->getContext()) &&
- "Invalid bitcast");
+ assert(DestTy->isInteger(32) && "Invalid bitcast");
GV.IntVal.floatToBits(GV.FloatVal);
break;
case Type::DoubleTyID:
- assert(DestTy == Type::getInt64Ty(DestTy->getContext()) &&
- "Invalid bitcast");
+ assert(DestTy->isInteger(64) && "Invalid bitcast");
GV.IntVal.doubleToBits(GV.DoubleVal);
break;
case Type::PointerTyID:
diff --git a/llvm/lib/ExecutionEngine/JIT/JIT.cpp b/llvm/lib/ExecutionEngine/JIT/JIT.cpp
index f8165ce2235..faf724fa854 100644
--- a/llvm/lib/ExecutionEngine/JIT/JIT.cpp
+++ b/llvm/lib/ExecutionEngine/JIT/JIT.cpp
@@ -411,7 +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->isVoidTy()) {
+ if (RetTy->isInteger(32) || RetTy->isVoidTy()) {
switch (ArgValues.size()) {
case 3:
if (FTy->getParamType(0)->isInteger(32) &&
OpenPOWER on IntegriCloud