diff --git a/include/llvm/ADT/PointerIntPair.h b/include/llvm/ADT/PointerIntPair.h index 773dea49c25..4c4bb7dd081 100644 --- a/include/llvm/ADT/PointerIntPair.h +++ b/include/llvm/ADT/PointerIntPair.h @@ -42,12 +42,12 @@ public: } IntType getInt() const { - return (IntType)(Value & (1 << IntBits)-1); + return (IntType)(Value & ((1 << IntBits)-1)); } void setPointer(PointerTy Ptr) { intptr_t PtrVal = reinterpret_cast(Ptr); - assert((PtrVal & (1 << IntBits)-1) == 0 && + assert((PtrVal & ((1 << IntBits)-1)) == 0 && "Pointer is not sufficiently aligned"); Value = PtrVal | (intptr_t)getInt(); }