diff options
author | Mike Stump <mrs@apple.com> | 2009-05-30 03:49:43 +0000 |
---|---|---|
committer | Mike Stump <mrs@apple.com> | 2009-05-30 03:49:43 +0000 |
commit | 6df540f9bd0023f66f343726f62a6ec191af9bea (patch) | |
tree | 3f470d94f3287740e9a185e43ac728d99170c500 /include/llvm/ADT/APFloat.h | |
parent | c19467424889a76b42eb17134180e42ff528c55b (diff) | |
download | external_llvm-6df540f9bd0023f66f343726f62a6ec191af9bea.zip external_llvm-6df540f9bd0023f66f343726f62a6ec191af9bea.tar.gz external_llvm-6df540f9bd0023f66f343726f62a6ec191af9bea.tar.bz2 |
Add support for letting the client choose different flavors of NaNs. Testcase to be
added in clang.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72606 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/ADT/APFloat.h')
-rw-r--r-- | include/llvm/ADT/APFloat.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/include/llvm/ADT/APFloat.h b/include/llvm/ADT/APFloat.h index 29a89dd..aebc6e6 100644 --- a/include/llvm/ADT/APFloat.h +++ b/include/llvm/ADT/APFloat.h @@ -174,7 +174,7 @@ namespace llvm { // Constructors. APFloat(const fltSemantics &, const char *); APFloat(const fltSemantics &, integerPart); - APFloat(const fltSemantics &, fltCategory, bool negative); + APFloat(const fltSemantics &, fltCategory, bool negative, unsigned type=0); explicit APFloat(double d); explicit APFloat(float f); explicit APFloat(const APInt &, bool isIEEE = false); @@ -188,8 +188,9 @@ namespace llvm { static APFloat getInf(const fltSemantics &Sem, bool Negative = false) { return APFloat(Sem, fcInfinity, Negative); } - static APFloat getNaN(const fltSemantics &Sem, bool Negative = false) { - return APFloat(Sem, fcNaN, Negative); + static APFloat getNaN(const fltSemantics &Sem, bool Negative = false, + long unsigned type=0) { + return APFloat(Sem, fcNaN, Negative, type); } /// Profile - Used to insert APFloat objects, or objects that contain @@ -296,7 +297,7 @@ namespace llvm { opStatus modSpecials(const APFloat &); /* Miscellany. */ - void makeNaN(void); + void makeNaN(unsigned = 0); opStatus normalize(roundingMode, lostFraction); opStatus addOrSubtract(const APFloat &, roundingMode, bool subtract); cmpResult compareAbsoluteValue(const APFloat &) const; |