[llvm-commits] CVS: llvm/lib/ExecutionEngine/Interpreter/Execution.cpp
Chris Lattner
sabre at nondot.org
Sun Jan 14 18:03:35 PST 2007
Changes in directory llvm/lib/ExecutionEngine/Interpreter:
Execution.cpp updated: 1.157 -> 1.158
---
Log message:
eliminate calls to Type::isInteger, preferring isIntegral instead.
---
Diffs of the changes: (+4 -4)
Execution.cpp | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
Index: llvm/lib/ExecutionEngine/Interpreter/Execution.cpp
diff -u llvm/lib/ExecutionEngine/Interpreter/Execution.cpp:1.157 llvm/lib/ExecutionEngine/Interpreter/Execution.cpp:1.158
--- llvm/lib/ExecutionEngine/Interpreter/Execution.cpp:1.157 Fri Jan 12 01:05:13 2007
+++ llvm/lib/ExecutionEngine/Interpreter/Execution.cpp Sun Jan 14 20:03:16 2007
@@ -1541,14 +1541,14 @@
if (isa<PointerType>(DstTy)) {
assert(isa<PointerType>(SrcTy) && "Invalid BitCast");
Dest.PointerVal = Src.PointerVal;
- } else if (DstTy->isInteger()) {
+ } else if (DstTy->isIntegral()) {
const IntegerType *DITy = cast<IntegerType>(DstTy);
unsigned DBitWidth = DITy->getBitWidth();
if (SrcTy == Type::FloatTy) {
Dest.Int32Val = FloatToBits(Src.FloatVal);
} else if (SrcTy == Type::DoubleTy) {
Dest.Int64Val = DoubleToBits(Src.DoubleVal);
- } else if (SrcTy->isInteger()) {
+ } else if (SrcTy->isIntegral()) {
const IntegerType *SITy = cast<IntegerType>(SrcTy);
unsigned SBitWidth = SITy->getBitWidth();
assert(SBitWidth <= 64 && "Integer types > 64 bits not supported");
@@ -1566,12 +1566,12 @@
} else
assert(0 && "Invalid BitCast");
} else if (DstTy == Type::FloatTy) {
- if (SrcTy->isInteger())
+ if (SrcTy->isIntegral())
Dest.FloatVal = BitsToFloat(Src.Int32Val);
else
Dest.FloatVal = Src.FloatVal;
} else if (DstTy == Type::DoubleTy) {
- if (SrcTy->isInteger())
+ if (SrcTy->isIntegral())
Dest.DoubleVal = BitsToDouble(Src.Int64Val);
else
Dest.DoubleVal = Src.DoubleVal;
More information about the llvm-commits
mailing list