aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2007-10-24 18:54:28 +0000
committerChris Lattner <sabre@nondot.org>2007-10-24 18:54:28 +0000
commit10c42185d82c121e8f7d261decde798c05567c59 (patch)
tree0164d6e5c8dae17dfdd23eddb5f51ca70f7dd0e1
parent975de81086ab7e59e85a34508e16156206a036c7 (diff)
add a nice predicate to check to see if nan
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43304 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/llvm/ADT/APFloat.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/llvm/ADT/APFloat.h b/include/llvm/ADT/APFloat.h
index 9037ef5f72..b605faab31 100644
--- a/include/llvm/ADT/APFloat.h
+++ b/include/llvm/ADT/APFloat.h
@@ -232,6 +232,7 @@ namespace llvm {
const fltSemantics &getSemantics() const { return *semantics; }
bool isZero() const { return category == fcZero; }
bool isNonZero() const { return category != fcZero; }
+ bool isNaN() const { return category == fcNaN; }
bool isNegative() const { return sign; }
bool isPosZero() const { return isZero() && !isNegative(); }
bool isNegZero() const { return isZero() && isNegative(); }