[llvm-commits] [llvm] r70148 - /llvm/trunk/include/llvm/ADT/PointerIntPair.h
Bill Wendling
isanbard at gmail.com
Sun Apr 26 12:46:43 PDT 2009
Author: void
Date: Sun Apr 26 14:46:41 2009
New Revision: 70148
URL: http://llvm.org/viewvc/llvm-project?rev=70148&view=rev
Log:
Use uint64_t instead of unsigned.
Modified:
llvm/trunk/include/llvm/ADT/PointerIntPair.h
Modified: llvm/trunk/include/llvm/ADT/PointerIntPair.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/PointerIntPair.h?rev=70148&r1=70147&r2=70148&view=diff
==============================================================================
--- llvm/trunk/include/llvm/ADT/PointerIntPair.h (original)
+++ llvm/trunk/include/llvm/ADT/PointerIntPair.h Sun Apr 26 14:46:41 2009
@@ -42,16 +42,18 @@
intptr_t Value;
enum {
/// PointerBitMask - The bits that come from the pointer.
- PointerBitMask = ~(((intptr_t)1 << PtrTraits::NumLowBitsAvailable)-1),
+ PointerBitMask =
+ ~(uint64_t)(((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 = (uint64_t)PtrTraits::NumLowBitsAvailable-IntBits,
/// IntMask - This is the unshifted mask for valid bits of the int type.
- IntMask = ((intptr_t)1 << IntBits)-1,
+ IntMask = (uint64_t)(((intptr_t)1 << IntBits)-1),
// ShiftedIntMask - This is the bits for the integer shifted in place.
- ShiftedIntMask = IntMask << IntShift
+ ShiftedIntMask = (uint64_t)(IntMask << IntShift)
};
public:
PointerIntPair() : Value(0) {}
More information about the llvm-commits
mailing list