Simplify code using convertFromZeroExtendedInteger with an APInt
authorDan Gohman <gohman@apple.com>
Fri, 29 Feb 2008 01:27:13 +0000 (01:27 +0000)
committerDan Gohman <gohman@apple.com>
Fri, 29 Feb 2008 01:27:13 +0000 (01:27 +0000)
by using the new convertFromAPInt directly.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47739 91177308-0d34-0410-b5e6-96231b3b80d8

lib/ExecutionEngine/ExecutionEngine.cpp

index 5e883917129a52ed0fb0fb4e3b6955a9086f5d0e..8796a2d2e6c94382e0f3653794a93a2fc9ab6532 100644 (file)
@@ -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;