diff options
author | Jay Foad <jay.foad@gmail.com> | 2010-11-28 21:04:48 +0000 |
---|---|---|
committer | Jay Foad <jay.foad@gmail.com> | 2010-11-28 21:04:48 +0000 |
commit | e4d19c9eb22899c9a555395d446a9ceef3bea7eb (patch) | |
tree | 0e8700eca311224bf9289faf4b222029b521c48c /lib/ExecutionEngine/Interpreter/Execution.cpp | |
parent | d8f717911dcdccb1a60b3049ea22c7767970dcb7 (diff) |
PR5207: change APInt::doubleToBits() and APInt::floatToBits() to be
static methods that return a new APInt.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120261 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/ExecutionEngine/Interpreter/Execution.cpp')
-rw-r--r-- | lib/ExecutionEngine/Interpreter/Execution.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/ExecutionEngine/Interpreter/Execution.cpp b/lib/ExecutionEngine/Interpreter/Execution.cpp index 59ebe6e2a8..498063bf65 100644 --- a/lib/ExecutionEngine/Interpreter/Execution.cpp +++ b/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 |