diff options
author | Owen Anderson <resistor@mac.com> | 2009-07-13 22:18:28 +0000 |
---|---|---|
committer | Owen Anderson <resistor@mac.com> | 2009-07-13 22:18:28 +0000 |
commit | fa82b6eba4e1584d7dba291c28fe908272e1e002 (patch) | |
tree | 033b1e9a873ad04863a5c5849ab515ba31d17e60 /include/llvm/Constants.h | |
parent | 0c39e3839a7d7e0dbd49b6b2d3e1bdc735b2b3aa (diff) | |
download | llvm-fa82b6eba4e1584d7dba291c28fe908272e1e002.tar.gz llvm-fa82b6eba4e1584d7dba291c28fe908272e1e002.tar.bz2 llvm-fa82b6eba4e1584d7dba291c28fe908272e1e002.tar.xz |
These don't really need contexts either.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75528 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Constants.h')
-rw-r--r-- | include/llvm/Constants.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/llvm/Constants.h b/include/llvm/Constants.h index b727de31ae..143f3ad757 100644 --- a/include/llvm/Constants.h +++ b/include/llvm/Constants.h @@ -270,6 +270,12 @@ public: /// getNullValue. Don't depend on == for doubles to tell us it's zero, it /// considers -0.0 to be null as well as 0.0. :( virtual bool isNullValue() const; + + /// isNegativeZeroValue - Return true if the value is what would be returned + /// by getZeroValueForNegation. + virtual bool isNegativeZeroValue() const { + return Val.isZero() && Val.isNegative(); + } /// isExactlyValue - We don't rely on operator== working on double values, as /// it returns true for things that are clearly not equal, like -0.0 and 0.0. |