X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=include%2Fllvm%2FADT%2FSmallBitVector.h;h=b15b3ee0418f9ce1f0b5f131058f0cda4ffc87da;hb=297738fa95d4bb7849c197926f4d4abdcd812e40;hp=3441d0a90c9b222d1b427133265ef44d25e7b03d;hpb=6340722d1751841a00e791a44d8f2f5e481b8c61;p=oota-llvm.git diff --git a/include/llvm/ADT/SmallBitVector.h b/include/llvm/ADT/SmallBitVector.h index 3441d0a90c9..b15b3ee0418 100644 --- a/include/llvm/ADT/SmallBitVector.h +++ b/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())