aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/llvm/ADT/PointerIntPair.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/llvm/ADT/PointerIntPair.h b/include/llvm/ADT/PointerIntPair.h
index 773dea49c2..4c4bb7dd08 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<intptr_t>(Ptr);
- assert((PtrVal & (1 << IntBits)-1) == 0 &&
+ assert((PtrVal & ((1 << IntBits)-1)) == 0 &&
"Pointer is not sufficiently aligned");
Value = PtrVal | (intptr_t)getInt();
}