[llvm-commits] [llvm] r43304 - /llvm/trunk/include/llvm/ADT/APFloat.h
Chris Lattner
sabre at nondot.org
Wed Oct 24 11:54:28 PDT 2007
Author: lattner
Date: Wed Oct 24 13:54:28 2007
New Revision: 43304
URL: http://llvm.org/viewvc/llvm-project?rev=43304&view=rev
Log:
add a nice predicate to check to see if nan
Modified:
llvm/trunk/include/llvm/ADT/APFloat.h
Modified: llvm/trunk/include/llvm/ADT/APFloat.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/APFloat.h?rev=43304&r1=43303&r2=43304&view=diff
==============================================================================
--- llvm/trunk/include/llvm/ADT/APFloat.h (original)
+++ llvm/trunk/include/llvm/ADT/APFloat.h Wed Oct 24 13:54:28 2007
@@ -232,6 +232,7 @@
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(); }
More information about the llvm-commits
mailing list