Skip to content

Commit 2fa2ece

Browse files
kazutakahiratagithub-actions[bot]
authored andcommitted
Automerge: [ADT] Simplify IntMask (NFC) (#158410)
We can do the shift in uintptr_t without going through intptr_t.
2 parents 640f697 + d594a00 commit 2fa2ece

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/include/llvm/ADT/PointerIntPair.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ struct PointerIntPairInfo {
180180
IntShift = (uintptr_t)PtrTraits::NumLowBitsAvailable - IntBits,
181181

182182
/// IntMask - This is the unshifted mask for valid bits of the int type.
183-
IntMask = (uintptr_t)(((intptr_t)1 << IntBits) - 1),
183+
IntMask = ((uintptr_t)1 << IntBits) - 1,
184184

185185
// ShiftedIntMask - This is the bits for the integer shifted in place.
186186
ShiftedIntMask = (uintptr_t)(IntMask << IntShift)

0 commit comments

Comments
 (0)