From: Chris Lattner Date: Sat, 29 Nov 2008 01:36:16 +0000 (+0000) Subject: Fix sentinels to use correctly 'aligned' pointers. X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=d63e618212ae716f775c4a03658377d4d8eba5ff;p=oota-llvm.git Fix sentinels to use correctly 'aligned' pointers. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60229 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/llvm/ADT/PointerIntPair.h b/include/llvm/ADT/PointerIntPair.h index 60671da77ed..f4518f0f2c4 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());