Test Plan: llvm regression test suite
Reviewers: chandlerc, rsmith
Reviewed By: rsmith
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D4976
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@217058
91177308-0d34-0410-b5e6-
96231b3b80d8
: public ValueHandleBase
#endif
{
+ friend struct DenseMapInfo<AssertingVH<ValueTy> >;
#ifndef NDEBUG
ValueTy *getValPtr() const {
static unsigned getHashValue(const AssertingVH<T> &Val) {
return PointerInfo::getHashValue(Val);
}
+#ifndef NDEBUG
+ static bool isEqual(const AssertingVH<T> &LHS, const AssertingVH<T> &RHS) {
+ // Avoid downcasting AssertingVH<T> to T*, as empty/tombstone keys may not
+ // be properly aligned pointers to T*.
+ return LHS.ValueHandleBase::getValPtr() == RHS.ValueHandleBase::getValPtr();
+ }
+#else
static bool isEqual(const AssertingVH<T> &LHS, const AssertingVH<T> &RHS) {
return LHS == RHS;
}
+#endif
};
-
+
template <typename T>
struct isPodLike<AssertingVH<T> > {
#ifdef NDEBUG