From d63e618212ae716f775c4a03658377d4d8eba5ff Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sat, 29 Nov 2008 01:36:16 +0000 Subject: Fix sentinels to use correctly 'aligned' pointers. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60229 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/ADT/PointerIntPair.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include/llvm/ADT/PointerIntPair.h') 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 struct DenseMapInfo > { typedef PointerIntPair Ty; static Ty getEmptyKey() { - return Ty(reinterpret_cast(-1), + return Ty(reinterpret_cast(-1 << IntBits), IntType((1 << IntBits)-1)); } static Ty getTombstoneKey() { - return Ty(reinterpret_cast(-2), IntType(0)); + return Ty(reinterpret_cast(-2 << IntBits), IntType(0)); } static unsigned getHashValue(Ty V) { uintptr_t IV = reinterpret_cast(V.getOpaqueValue()); -- cgit v1.2.3