diff options
author | Dan Gohman <gohman@apple.com> | 2008-02-29 01:27:13 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2008-02-29 01:27:13 +0000 |
commit | 628240649267597f3f27a51ab046b5841c24a953 (patch) | |
tree | e2995ea62dcb695efa7e31ec5b9115e5d5d9ea44 | |
parent | 93c276e1c92da03ce9805fd3f3814b5e9b8cd57c (diff) | |
download | external_llvm-628240649267597f3f27a51ab046b5841c24a953.zip external_llvm-628240649267597f3f27a51ab046b5841c24a953.tar.gz external_llvm-628240649267597f3f27a51ab046b5841c24a953.tar.bz2 |
Simplify code using convertFromZeroExtendedInteger with an APInt
by using the new convertFromAPInt directly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47739 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/ExecutionEngine/ExecutionEngine.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/ExecutionEngine/ExecutionEngine.cpp b/lib/ExecutionEngine/ExecutionEngine.cpp index 5e88391..8796a2d 100644 --- a/lib/ExecutionEngine/ExecutionEngine.cpp +++ b/lib/ExecutionEngine/ExecutionEngine.cpp @@ -424,9 +424,9 @@ GenericValue ExecutionEngine::getConstantValue(const Constant *C) { else if (CE->getType() == Type::X86_FP80Ty) { const uint64_t zero[] = {0, 0}; APFloat apf = APFloat(APInt(80, 2, zero)); - (void)apf.convertFromZeroExtendedInteger(GV.IntVal.getRawData(), - GV.IntVal.getBitWidth(), false, - APFloat::rmNearestTiesToEven); + (void)apf.convertFromAPInt(GV.IntVal, + false, + APFloat::rmNearestTiesToEven); GV.IntVal = apf.convertToAPInt(); } return GV; @@ -440,9 +440,9 @@ GenericValue ExecutionEngine::getConstantValue(const Constant *C) { else if (CE->getType() == Type::X86_FP80Ty) { const uint64_t zero[] = { 0, 0}; APFloat apf = APFloat(APInt(80, 2, zero)); - (void)apf.convertFromZeroExtendedInteger(GV.IntVal.getRawData(), - GV.IntVal.getBitWidth(), true, - APFloat::rmNearestTiesToEven); + (void)apf.convertFromAPInt(GV.IntVal, + true, + APFloat::rmNearestTiesToEven); GV.IntVal = apf.convertToAPInt(); } return GV; |