aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/ADT/PointerIntPair.h
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2009-04-26 18:10:20 +0000
committerBill Wendling <isanbard@gmail.com>2009-04-26 18:10:20 +0000
commit2ae44a0e8bc6625e96c8a98e1e221e2c75fcf36c (patch)
tree4349b00100327c1eab34e3527bfd3c4ec25db0f3 /include/llvm/ADT/PointerIntPair.h
parentd2d18c3dc46917183cd3c97b651975566d943e72 (diff)
downloadexternal_llvm-2ae44a0e8bc6625e96c8a98e1e221e2c75fcf36c.zip
external_llvm-2ae44a0e8bc6625e96c8a98e1e221e2c75fcf36c.tar.gz
external_llvm-2ae44a0e8bc6625e96c8a98e1e221e2c75fcf36c.tar.bz2
Suppress warnings about conversion shortening 64-bit to 32-bit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70138 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/ADT/PointerIntPair.h')
-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) {}