Skip to content

Commit dea8217

Browse files
[ADT] Use llvm::has_single_bit (NFC) (#146219)
1 parent 289c066 commit dea8217

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/include/llvm/ADT/SmallPtrSet.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ class SmallPtrSetImplBase : public DebugEpochBase {
8080
explicit SmallPtrSetImplBase(const void **SmallStorage, unsigned SmallSize)
8181
: CurArray(SmallStorage), CurArraySize(SmallSize), NumNonEmpty(0),
8282
NumTombstones(0), IsSmall(true) {
83-
assert(SmallSize && (SmallSize & (SmallSize-1)) == 0 &&
83+
assert(llvm::has_single_bit(SmallSize) &&
8484
"Initial size must be a power of two!");
8585
}
8686

0 commit comments

Comments
 (0)