Skip to content

Commit 625a964

Browse files
[llvm] Use llvm::has_single_bit (NFC)
1 parent b8f1228 commit 625a964

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)