aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Support
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
commite4d19c9eb22899c9a555395d446a9ceef3bea7eb (patch)
tree0e8700eca311224bf9289faf4b222029b521c48c /lib/Support
parentd8f717911dcdccb1a60b3049ea22c7767970dcb7 (diff)
downloadexternal_llvm-e4d19c9eb22899c9a555395d446a9ceef3bea7eb.zip
external_llvm-e4d19c9eb22899c9a555395d446a9ceef3bea7eb.tar.gz
external_llvm-e4d19c9eb22899c9a555395d446a9ceef3bea7eb.tar.bz2
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/Support')
-rw-r--r--lib/Support/APFloat.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/Support/APFloat.cpp b/lib/Support/APFloat.cpp
index b87ddf9..c0151e2 100644
--- a/lib/Support/APFloat.cpp
+++ b/lib/Support/APFloat.cpp
@@ -3258,14 +3258,12 @@ APFloat::APFloat(const APInt& api, bool isIEEE)
APFloat::APFloat(float f)
{
- APInt api = APInt(32, 0);
- initFromAPInt(api.floatToBits(f));
+ initFromAPInt(APInt::floatToBits(f));
}
APFloat::APFloat(double d)
{
- APInt api = APInt(64, 0);
- initFromAPInt(api.doubleToBits(d));
+ initFromAPInt(APInt::doubleToBits(d));
}
namespace {