[llvm-commits] [llvm] r60229 - /llvm/trunk/include/llvm/ADT/PointerIntPair.h
Chris Lattner
sabre at nondot.org
Fri Nov 28 17:36:16 PST 2008
Author: lattner
Date: Fri Nov 28 19:36:16 2008
New Revision: 60229
URL: http://llvm.org/viewvc/llvm-project?rev=60229&view=rev
Log:
Fix sentinels to use correctly 'aligned' pointers.
Modified:
llvm/trunk/include/llvm/ADT/PointerIntPair.h
Modified: llvm/trunk/include/llvm/ADT/PointerIntPair.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/PointerIntPair.h?rev=60229&r1=60228&r2=60229&view=diff
==============================================================================
--- llvm/trunk/include/llvm/ADT/PointerIntPair.h (original)
+++ llvm/trunk/include/llvm/ADT/PointerIntPair.h Fri Nov 28 19:36:16 2008
@@ -73,11 +73,11 @@
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());
More information about the llvm-commits
mailing list