diff options
author | Chris Lattner <sabre@nondot.org> | 2008-04-20 00:41:09 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2008-04-20 00:41:09 +0000 |
commit | 02a260aa11a2e1b2c14335274d3c42ca3f3eabc0 (patch) | |
tree | 59bcb7cd7311445a4fc05e67a6d7897f59ebbb83 /lib/ExecutionEngine | |
parent | eb9c8e1e3fd81607f8aa71f2b8b1592d6d333337 (diff) | |
download | external_llvm-02a260aa11a2e1b2c14335274d3c42ca3f3eabc0.zip external_llvm-02a260aa11a2e1b2c14335274d3c42ca3f3eabc0.tar.gz external_llvm-02a260aa11a2e1b2c14335274d3c42ca3f3eabc0.tar.bz2 |
Switch to using Simplified ConstantFP::get API.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49977 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/ExecutionEngine')
-rw-r--r-- | lib/ExecutionEngine/JIT/JIT.cpp | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/lib/ExecutionEngine/JIT/JIT.cpp b/lib/ExecutionEngine/JIT/JIT.cpp index 776129e..281869a 100644 --- a/lib/ExecutionEngine/JIT/JIT.cpp +++ b/lib/ExecutionEngine/JIT/JIT.cpp @@ -235,22 +235,26 @@ GenericValue JIT::runFunction(Function *F, const GenericValue &AV = ArgValues[i]; switch (ArgTy->getTypeID()) { default: assert(0 && "Unknown argument type for function call!"); - case Type::IntegerTyID: C = ConstantInt::get(AV.IntVal); break; - case Type::FloatTyID: C = ConstantFP ::get(ArgTy, APFloat(AV.FloatVal)); - break; - case Type::DoubleTyID: C = ConstantFP ::get(ArgTy, APFloat(AV.DoubleVal)); - break; + case Type::IntegerTyID: + C = ConstantInt::get(AV.IntVal); + break; + case Type::FloatTyID: + C = ConstantFP::get(APFloat(AV.FloatVal)); + break; + case Type::DoubleTyID: + C = ConstantFP::get(APFloat(AV.DoubleVal)); + break; case Type::PPC_FP128TyID: case Type::X86_FP80TyID: - case Type::FP128TyID: C = ConstantFP ::get(ArgTy, APFloat(AV.IntVal)); - break; + case Type::FP128TyID: + C = ConstantFP::get(APFloat(AV.IntVal)); + break; case Type::PointerTyID: void *ArgPtr = GVTOP(AV); - if (sizeof(void*) == 4) { + if (sizeof(void*) == 4) C = ConstantInt::get(Type::Int32Ty, (int)(intptr_t)ArgPtr); - } else { + else C = ConstantInt::get(Type::Int64Ty, (intptr_t)ArgPtr); - } C = ConstantExpr::getIntToPtr(C, ArgTy); // Cast the integer to pointer break; } |