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 | 12595d7b165bf460b18f4ddd395dd29e6e6e68bc (patch) | |
tree | faf1eb03b939699d0d02ccffedb56e8ebf9b7230 /include/llvm | |
parent | 8bb369b8072c919ef5802f639a52b17620201190 (diff) | |
download | external_llvm-12595d7b165bf460b18f4ddd395dd29e6e6e68bc.zip external_llvm-12595d7b165bf460b18f4ddd395dd29e6e6e68bc.tar.gz external_llvm-12595d7b165bf460b18f4ddd395dd29e6e6e68bc.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')
-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; } |