aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/llvm/ADT/PointerIntPair.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/include/llvm/ADT/PointerIntPair.h b/include/llvm/ADT/PointerIntPair.h
index 43a083d..e987b10 100644
--- a/include/llvm/ADT/PointerIntPair.h
+++ b/include/llvm/ADT/PointerIntPair.h
@@ -42,16 +42,18 @@ class PointerIntPair {
intptr_t Value;
enum {
/// PointerBitMask - The bits that come from the pointer.
- PointerBitMask = ~(((intptr_t)1 << PtrTraits::NumLowBitsAvailable)-1),
+ PointerBitMask =
+ ~(unsigned)(((intptr_t)1 << PtrTraits::NumLowBitsAvailable)-1),
+
/// IntShift - The number of low bits that we reserve for other uses, and
/// keep zero.
- IntShift = PtrTraits::NumLowBitsAvailable-IntBits,
+ IntShift = (unsigned)PtrTraits::NumLowBitsAvailable-IntBits,
/// IntMask - This is the unshifted mask for valid bits of the int type.
- IntMask = ((intptr_t)1 << IntBits)-1,
+ IntMask = (unsigned)(((intptr_t)1 << IntBits)-1),
// ShiftedIntMask - This is the bits for the integer shifted in place.
- ShiftedIntMask = IntMask << IntShift
+ ShiftedIntMask = (unsigned)(IntMask << IntShift)
};
public:
PointerIntPair() : Value(0) {}