summaryrefslogtreecommitdiffstats
path: root/contrib/llvm/include/llvm/ADT/SmallBitVector.h
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/llvm/include/llvm/ADT/SmallBitVector.h')
-rw-r--r--contrib/llvm/include/llvm/ADT/SmallBitVector.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/contrib/llvm/include/llvm/ADT/SmallBitVector.h b/contrib/llvm/include/llvm/ADT/SmallBitVector.h
index 3441d0a..b15b3ee 100644
--- a/contrib/llvm/include/llvm/ADT/SmallBitVector.h
+++ b/contrib/llvm/include/llvm/ADT/SmallBitVector.h
@@ -187,6 +187,13 @@ public:
return getPointer()->any();
}
+ /// all - Returns true if all bits are set.
+ bool all() const {
+ if (isSmall())
+ return getSmallBits() == (uintptr_t(1) << getSmallSize()) - 1;
+ return getPointer()->all();
+ }
+
/// none - Returns true if none of the bits are set.
bool none() const {
if (isSmall())
OpenPOWER on IntegriCloud