diff options
author | Dale Johannesen <dalej@apple.com> | 2007-08-24 22:09:56 +0000 |
---|---|---|
committer | Dale Johannesen <dalej@apple.com> | 2007-08-24 22:09:56 +0000 |
commit | 0210fe8a151fe417c70ba5402f5ce9a4f94f3e3e (patch) | |
tree | faf1eb03b939699d0d02ccffedb56e8ebf9b7230 /include/llvm/ADT | |
parent | 70aa12595d0387e2421e1adc4ec960705092bed4 (diff) | |
download | external_llvm-0210fe8a151fe417c70ba5402f5ce9a4f94f3e3e.zip external_llvm-0210fe8a151fe417c70ba5402f5ce9a4f94f3e3e.tar.gz external_llvm-0210fe8a151fe417c70ba5402f5ce9a4f94f3e3e.tar.bz2 |
Poison APFloat::operator==. Replace existing uses with bitwiseIsEqual.
This means backing out the preceding change to Constants.cpp, alas.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41378 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/ADT')
-rw-r--r-- | include/llvm/ADT/APFloat.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/include/llvm/ADT/APFloat.h b/include/llvm/ADT/APFloat.h index 695c99a..7b95392 100644 --- a/include/llvm/ADT/APFloat.h +++ b/include/llvm/ADT/APFloat.h @@ -187,17 +187,17 @@ namespace llvm { double convertToDouble() const; float convertToFloat() const; + /* The definition of equality is not straightforward for floating point, + so we won't use operator==. Use one of the following, or write + whatever it is you really mean. */ + bool operator==(const APFloat &) const; // DO NOT IMPLEMENT + /* IEEE comparison with another floating point number (QNaNs compare unordered, 0==-0). */ cmpResult compare(const APFloat &) const; /* Bitwise comparison for equality (QNaNs compare equal, 0!=-0). */ - bool operator==(const APFloat &) const; - - /* Inversion of the preceding. */ - inline bool operator!=(const APFloat &RHS) const { - return !((*this)==RHS); - } + bool bitwiseIsEqual(const APFloat &) const; /* Simple queries. */ fltCategory getCategory() const { return category; } |