summaryrefslogtreecommitdiffstats
path: root/llvm/include
diff options
context:
space:
mode:
authorStephen Canon <scanon@apple.com>2015-11-16 21:52:48 +0000
committerStephen Canon <scanon@apple.com>2015-11-16 21:52:48 +0000
commit1bfc89baacea6f67beb0c13a8795f752577e1cc2 (patch)
tree0aad1e04eef67fac573ddecb48218e87bf99e86b /llvm/include
parent927bdba29d5f0fbb6e98b204bdf0083e0dda7b62 (diff)
downloadbcm5719-llvm-1bfc89baacea6f67beb0c13a8795f752577e1cc2.tar.gz
bcm5719-llvm-1bfc89baacea6f67beb0c13a8795f752577e1cc2.zip
Add isInteger() to APFloat.
Useful utility function; this wasn't too hard to do before, but also wasn't obviously discoverable. Make it explicit. Reviewed offline by Michael Gottesman. llvm-svn: 253254
Diffstat (limited to 'llvm/include')
-rw-r--r--llvm/include/llvm/ADT/APFloat.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/include/llvm/ADT/APFloat.h b/llvm/include/llvm/ADT/APFloat.h
index 5984749ea9a..3fe04060fd5 100644
--- a/llvm/include/llvm/ADT/APFloat.h
+++ b/llvm/include/llvm/ADT/APFloat.h
@@ -448,6 +448,9 @@ public:
/// Returns true if and only if the number has the largest possible finite
/// magnitude in the current semantics.
bool isLargest() const;
+
+ /// Returns true if and only if the number is an exact integer.
+ bool isInteger() const;
/// @}
OpenPOWER on IntegriCloud