diff options
| author | Reid Spencer <rspencer@reidspencer.com> | 2007-01-12 04:24:46 +0000 |
|---|---|---|
| committer | Reid Spencer <rspencer@reidspencer.com> | 2007-01-12 04:24:46 +0000 |
| commit | cddc9dfe975c3152a2db955b24cb6b4ee457e571 (patch) | |
| tree | a06773a4c05b5949c043c0246fcb64b88f073653 /llvm/lib/ExecutionEngine | |
| parent | e4c7fcd1bd0e85b1dc83bed2c8a293cbd1514317 (diff) | |
| download | bcm5719-llvm-cddc9dfe975c3152a2db955b24cb6b4ee457e571.tar.gz bcm5719-llvm-cddc9dfe975c3152a2db955b24cb6b4ee457e571.zip | |
Implement review feedback for the ConstantBool->ConstantInt merge. Chris
recommended that getBoolValue be replaced with getZExtValue and that
get(bool) be replaced by get(const Type*, uint64_t). This implements
those changes.
llvm-svn: 33110
Diffstat (limited to 'llvm/lib/ExecutionEngine')
| -rw-r--r-- | llvm/lib/ExecutionEngine/ExecutionEngine.cpp | 2 | ||||
| -rw-r--r-- | llvm/lib/ExecutionEngine/JIT/JIT.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/ExecutionEngine/ExecutionEngine.cpp b/llvm/lib/ExecutionEngine/ExecutionEngine.cpp index 3c388d32f36..e5f9ea1f40e 100644 --- a/llvm/lib/ExecutionEngine/ExecutionEngine.cpp +++ b/llvm/lib/ExecutionEngine/ExecutionEngine.cpp @@ -399,7 +399,7 @@ GenericValue ExecutionEngine::getConstantValue(const Constant *C) { switch (C->getType()->getTypeID()) { #define GET_CONST_VAL(TY, CTY, CLASS, GETMETH) \ case Type::TY##TyID: Result.TY##Val = (CTY)cast<CLASS>(C)->GETMETH(); break - GET_CONST_VAL(Int1 , bool , ConstantInt, getBoolValue); + GET_CONST_VAL(Int1 , bool , ConstantInt, getZExtValue); GET_CONST_VAL(Int8 , unsigned char , ConstantInt, getZExtValue); GET_CONST_VAL(Int16 , unsigned short, ConstantInt, getZExtValue); GET_CONST_VAL(Int32 , unsigned int , ConstantInt, getZExtValue); diff --git a/llvm/lib/ExecutionEngine/JIT/JIT.cpp b/llvm/lib/ExecutionEngine/JIT/JIT.cpp index f6ced0a2518..13ee7199d9f 100644 --- a/llvm/lib/ExecutionEngine/JIT/JIT.cpp +++ b/llvm/lib/ExecutionEngine/JIT/JIT.cpp @@ -191,7 +191,7 @@ GenericValue JIT::runFunction(Function *F, const GenericValue &AV = ArgValues[i]; switch (ArgTy->getTypeID()) { default: assert(0 && "Unknown argument type for function call!"); - case Type::Int1TyID: C = ConstantInt::get(AV.Int1Val); break; + case Type::Int1TyID: C = ConstantInt::get(ArgTy, AV.Int1Val); break; case Type::Int8TyID: C = ConstantInt::get(ArgTy, AV.Int8Val); break; case Type::Int16TyID: C = ConstantInt::get(ArgTy, AV.Int16Val); break; case Type::Int32TyID: C = ConstantInt::get(ArgTy, AV.Int32Val); break; |

