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/Support | |
parent | d8f717911dcdccb1a60b3049ea22c7767970dcb7 (diff) | |
download | external_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.cpp | 6 |
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 { |