projects
/
oota-llvm.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Define an operator<< for APInt to be used with std::ostream.
[oota-llvm.git]
/
include
/
llvm
/
ADT
/
PointerIntPair.h
diff --git
a/include/llvm/ADT/PointerIntPair.h
b/include/llvm/ADT/PointerIntPair.h
index 43a083d21ec588df1489f1a5325d7f3144c1e5ea..0aa478b1ff61cd7117d06ce780d319f11e7959e7 100644
(file)
--- 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.
intptr_t Value;
enum {
/// PointerBitMask - The bits that come from the pointer.
- PointerBitMask = ~(((intptr_t)1 << PtrTraits::NumLowBitsAvailable)-1),
+ PointerBitMask =
+ ~(uintptr_t)(((intptr_t)1 << PtrTraits::NumLowBitsAvailable)-1),
+
/// IntShift - The number of low bits that we reserve for other uses, and
/// keep zero.
/// IntShift - The number of low bits that we reserve for other uses, and
/// keep zero.
- IntShift = PtrTraits::NumLowBitsAvailable-IntBits,
+ IntShift =
(uintptr_t)
PtrTraits::NumLowBitsAvailable-IntBits,
/// IntMask - This is the unshifted mask for valid bits of the int type.
/// IntMask - This is the unshifted mask for valid bits of the int type.
- IntMask = (
(intptr_t)1 << IntBits)-1
,
+ IntMask = (
uintptr_t)(((intptr_t)1 << IntBits)-1)
,
// ShiftedIntMask - This is the bits for the integer shifted in place.
// ShiftedIntMask - This is the bits for the integer shifted in place.
- ShiftedIntMask =
IntMask << IntShift
+ ShiftedIntMask =
(uintptr_t)(IntMask << IntShift)
};
public:
PointerIntPair() : Value(0) {}
};
public:
PointerIntPair() : Value(0) {}