Changes in directory llvm/lib/ExecutionEngine:
ExecutionEngine.cpp updated: 1.100 -> 1.101 --- Log message: For PR1043: http://llvm.org/PR1043 : This is the final patch for this PR. It implements some minor cleanup in the use of IntegerType, to wit: 1. Type::getIntegerTypeMask -> IntegerType::getBitMask 2. Type::Int*Ty changed to IntegerType* from Type* 3. ConstantInt::getType() returns IntegerType* now, not Type* This also fixes PR1120: http://llvm.org/PR1120 . Patch by Sheng Zhou. --- Diffs of the changes: (+2 -6) ExecutionEngine.cpp | 8 ++------ 1 files changed, 2 insertions(+), 6 deletions(-) Index: llvm/lib/ExecutionEngine/ExecutionEngine.cpp diff -u llvm/lib/ExecutionEngine/ExecutionEngine.cpp:1.100 llvm/lib/ExecutionEngine/ExecutionEngine.cpp:1.101 --- llvm/lib/ExecutionEngine/ExecutionEngine.cpp:1.100 Thu Jan 18 12:01:32 2007 +++ llvm/lib/ExecutionEngine/ExecutionEngine.cpp Fri Jan 19 15:13:56 2007 @@ -456,9 +456,7 @@ switch (Ty->getTypeID()) { case Type::IntegerTyID: { unsigned BitWidth = cast<IntegerType>(Ty)->getBitWidth(); - uint64_t BitMask = (1ull << BitWidth) - 1; - if (BitWidth >= 64) - BitMask = (uint64_t)-1; + uint64_t BitMask = cast<IntegerType>(Ty)->getBitMask(); GenericValue TmpVal = Val; if (BitWidth <= 8) Ptr->Untyped[0] = Val.Int8Val & BitMask; @@ -514,9 +512,7 @@ switch (Ty->getTypeID()) { case Type::IntegerTyID: { unsigned BitWidth = cast<IntegerType>(Ty)->getBitWidth(); - uint64_t BitMask = (1ull << BitWidth) - 1; - if (BitWidth >= 64) - BitMask = (uint64_t)-1; + uint64_t BitMask = cast<IntegerType>(Ty)->getBitMask(); GenericValue TmpVal = Val; if (BitWidth <= 8) Ptr->Untyped[0] = Val.Int8Val & BitMask; _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits