aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/ADT/BitVector.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/ADT/BitVector.h')
-rw-r--r--include/llvm/ADT/BitVector.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/llvm/ADT/BitVector.h b/include/llvm/ADT/BitVector.h
index 9dcb9e1..1940fd3 100644
--- a/include/llvm/ADT/BitVector.h
+++ b/include/llvm/ADT/BitVector.h
@@ -127,6 +127,12 @@ public:
return false;
}
+ /// all - Returns true if all bits are set.
+ bool all() const {
+ // TODO: Optimize this.
+ return count() == size();
+ }
+
/// none - Returns true if none of the bits are set.
bool none() const {
return !any();