aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ExecutionEngine/ExecutionEngine.cpp
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2006-10-20 07:07:24 +0000
committerReid Spencer <rspencer@reidspencer.com>2006-10-20 07:07:24 +0000
commitb83eb6447ba155342598f0fabe1f08f5baa9164a (patch)
treea5822f5fdac89033b7b16ba8e5aaf1ae10833b1c /lib/ExecutionEngine/ExecutionEngine.cpp
parent6e7dd9db6bf677c9161a6ecc12f90651cf1231e0 (diff)
downloadexternal_llvm-b83eb6447ba155342598f0fabe1f08f5baa9164a.zip
external_llvm-b83eb6447ba155342598f0fabe1f08f5baa9164a.tar.gz
external_llvm-b83eb6447ba155342598f0fabe1f08f5baa9164a.tar.bz2
For PR950:
This patch implements the first increment for the Signless Types feature. All changes pertain to removing the ConstantSInt and ConstantUInt classes in favor of just using ConstantInt. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31063 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/ExecutionEngine/ExecutionEngine.cpp')
-rw-r--r--lib/ExecutionEngine/ExecutionEngine.cpp26
1 files changed, 13 insertions, 13 deletions
diff --git a/lib/ExecutionEngine/ExecutionEngine.cpp b/lib/ExecutionEngine/ExecutionEngine.cpp
index 067f24d..f61369c 100644
--- a/lib/ExecutionEngine/ExecutionEngine.cpp
+++ b/lib/ExecutionEngine/ExecutionEngine.cpp
@@ -390,19 +390,19 @@ GenericValue ExecutionEngine::getConstantValue(const Constant *C) {
}
switch (C->getType()->getTypeID()) {
-#define GET_CONST_VAL(TY, CTY, CLASS) \
- case Type::TY##TyID: Result.TY##Val = (CTY)cast<CLASS>(C)->getValue(); break
- GET_CONST_VAL(Bool , bool , ConstantBool);
- GET_CONST_VAL(UByte , unsigned char , ConstantUInt);
- GET_CONST_VAL(SByte , signed char , ConstantSInt);
- GET_CONST_VAL(UShort , unsigned short, ConstantUInt);
- GET_CONST_VAL(Short , signed short , ConstantSInt);
- GET_CONST_VAL(UInt , unsigned int , ConstantUInt);
- GET_CONST_VAL(Int , signed int , ConstantSInt);
- GET_CONST_VAL(ULong , uint64_t , ConstantUInt);
- GET_CONST_VAL(Long , int64_t , ConstantSInt);
- GET_CONST_VAL(Float , float , ConstantFP);
- GET_CONST_VAL(Double , double , ConstantFP);
+#define GET_CONST_VAL(TY, CTY, CLASS, GETMETH) \
+ case Type::TY##TyID: Result.TY##Val = (CTY)cast<CLASS>(C)->GETMETH(); break
+ GET_CONST_VAL(Bool , bool , ConstantBool, getValue);
+ GET_CONST_VAL(UByte , unsigned char , ConstantInt, getZExtValue);
+ GET_CONST_VAL(SByte , signed char , ConstantInt, getSExtValue);
+ GET_CONST_VAL(UShort , unsigned short, ConstantInt, getZExtValue);
+ GET_CONST_VAL(Short , signed short , ConstantInt, getSExtValue);
+ GET_CONST_VAL(UInt , unsigned int , ConstantInt, getZExtValue);
+ GET_CONST_VAL(Int , signed int , ConstantInt, getSExtValue);
+ GET_CONST_VAL(ULong , uint64_t , ConstantInt, getZExtValue);
+ GET_CONST_VAL(Long , int64_t , ConstantInt, getSExtValue);
+ GET_CONST_VAL(Float , float , ConstantFP, getValue);
+ GET_CONST_VAL(Double , double , ConstantFP, getValue);
#undef GET_CONST_VAL
case Type::PointerTyID:
if (isa<ConstantPointerNull>(C))