aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/ADT
diff options
context:
space:
mode:
authorDale Johannesen <dalej@apple.com>2007-09-11 18:32:33 +0000
committerDale Johannesen <dalej@apple.com>2007-09-11 18:32:33 +0000
commit1616e90a14e8df92adb026ceb047141056862de9 (patch)
treecb752d4a86ec5c5dd783cfc421e30d0cf7600e87 /include/llvm/ADT
parentd7b1fc63e2d2af03f122d0eeeda0f6a47586122f (diff)
downloadexternal_llvm-1616e90a14e8df92adb026ceb047141056862de9.zip
external_llvm-1616e90a14e8df92adb026ceb047141056862de9.tar.gz
external_llvm-1616e90a14e8df92adb026ceb047141056862de9.tar.bz2
Add APInt interfaces to APFloat (allows directly
access to bits). Use them in place of float and double interfaces where appropriate. First bits of x86 long double constants handling (untested, probably does not work). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41858 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/ADT')
-rw-r--r--include/llvm/ADT/APFloat.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/llvm/ADT/APFloat.h b/include/llvm/ADT/APFloat.h
index 83c370e..baa9de0 100644
--- a/include/llvm/ADT/APFloat.h
+++ b/include/llvm/ADT/APFloat.h
@@ -170,6 +170,7 @@ namespace llvm {
APFloat(const fltSemantics &, fltCategory, bool negative);
APFloat(double d);
APFloat(float f);
+ APFloat(const APInt &);
APFloat(const APFloat &);
~APFloat();
@@ -191,6 +192,7 @@ namespace llvm {
opStatus convertFromInteger(const integerPart *, unsigned int, bool,
roundingMode);
opStatus convertFromString(const char *, roundingMode);
+ APInt convertToAPInt() const;
double convertToDouble() const;
float convertToFloat() const;
@@ -256,6 +258,13 @@ namespace llvm {
roundingMode);
lostFraction combineLostFractions(lostFraction, lostFraction);
opStatus convertFromHexadecimalString(const char *, roundingMode);
+ APInt convertFloatAPFloatToAPInt() const;
+ APInt convertDoubleAPFloatToAPInt() const;
+ APInt convertF80LongDoubleAPFloatToAPInt() const;
+ void initFromAPInt(const APInt& api);
+ void initFromFloatAPInt(const APInt& api);
+ void initFromDoubleAPInt(const APInt& api);
+ void initFromF80LongDoubleAPInt(const APInt& api);
void assign(const APFloat &);
void copySignificand(const APFloat &);