summaryrefslogtreecommitdiffstats
path: root/llvm/lib/ExecutionEngine/Interpreter
diff options
context:
space:
mode:
authorJay Foad <jay.foad@gmail.com>2010-11-28 21:04:48 +0000
committerJay Foad <jay.foad@gmail.com>2010-11-28 21:04:48 +0000
commit3447fb01c0bdb1dce159681cc81c1f8a891cb0a2 (patch)
tree3dbfec25d76aefef156227f5c7b4a448f58c8b33 /llvm/lib/ExecutionEngine/Interpreter
parent7e8a99b1c3ed6dfb607400348bf9d5d70fba8f27 (diff)
downloadbcm5719-llvm-3447fb01c0bdb1dce159681cc81c1f8a891cb0a2.tar.gz
bcm5719-llvm-3447fb01c0bdb1dce159681cc81c1f8a891cb0a2.zip
PR5207: change APInt::doubleToBits() and APInt::floatToBits() to be
static methods that return a new APInt. llvm-svn: 120261
Diffstat (limited to 'llvm/lib/ExecutionEngine/Interpreter')
-rw-r--r--llvm/lib/ExecutionEngine/Interpreter/Execution.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/llvm/lib/ExecutionEngine/Interpreter/Execution.cpp b/llvm/lib/ExecutionEngine/Interpreter/Execution.cpp
index 59ebe6e2a88..498063bf655 100644
--- a/llvm/lib/ExecutionEngine/Interpreter/Execution.cpp
+++ b/llvm/lib/ExecutionEngine/Interpreter/Execution.cpp
@@ -1060,11 +1060,9 @@ GenericValue Interpreter::executeBitCastInst(Value *SrcVal, const Type *DstTy,
Dest.PointerVal = Src.PointerVal;
} else if (DstTy->isIntegerTy()) {
if (SrcTy->isFloatTy()) {
- Dest.IntVal.zext(sizeof(Src.FloatVal) * CHAR_BIT);
- Dest.IntVal.floatToBits(Src.FloatVal);
+ Dest.IntVal = APInt::floatToBits(Src.FloatVal);
} else if (SrcTy->isDoubleTy()) {
- Dest.IntVal.zext(sizeof(Src.DoubleVal) * CHAR_BIT);
- Dest.IntVal.doubleToBits(Src.DoubleVal);
+ Dest.IntVal = APInt::doubleToBits(Src.DoubleVal);
} else if (SrcTy->isIntegerTy()) {
Dest.IntVal = Src.IntVal;
} else
OpenPOWER on IntegriCloud