summaryrefslogtreecommitdiff
path: root/include/llvm/ADT/PointerIntPair.h
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2008-11-29 01:36:16 +0000
committerChris Lattner <sabre@nondot.org>2008-11-29 01:36:16 +0000
commitd63e618212ae716f775c4a03658377d4d8eba5ff (patch)
tree281e4f0b6e66529d2fb2a8d980c9b5a7935bace7 /include/llvm/ADT/PointerIntPair.h
parent9ac30537aa3c201b6950bc708e02b1885c288c8d (diff)
downloadllvm-d63e618212ae716f775c4a03658377d4d8eba5ff.tar.gz
llvm-d63e618212ae716f775c4a03658377d4d8eba5ff.tar.bz2
llvm-d63e618212ae716f775c4a03658377d4d8eba5ff.tar.xz
Fix sentinels to use correctly 'aligned' pointers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60229 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/ADT/PointerIntPair.h')
-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 60671da77e..f4518f0f2c 100644
--- a/include/llvm/ADT/PointerIntPair.h
+++ b/include/llvm/ADT/PointerIntPair.h
@@ -73,11 +73,11 @@ template<typename PointerTy, unsigned IntBits, typename IntType>
struct DenseMapInfo<PointerIntPair<PointerTy, IntBits, IntType> > {
typedef PointerIntPair<PointerTy, IntBits, IntType> Ty;
static Ty getEmptyKey() {
- return Ty(reinterpret_cast<PointerTy>(-1),
+ return Ty(reinterpret_cast<PointerTy>(-1 << IntBits),
IntType((1 << IntBits)-1));
}
static Ty getTombstoneKey() {
- return Ty(reinterpret_cast<PointerTy>(-2), IntType(0));
+ return Ty(reinterpret_cast<PointerTy>(-2 << IntBits), IntType(0));
}
static unsigned getHashValue(Ty V) {
uintptr_t IV = reinterpret_cast<uintptr_t>(V.getOpaqueValue());