summaryrefslogtreecommitdiff
path: root/include/llvm/ADT/PointerIntPair.h
diff options
context:
space:
mode:
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());