aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2011-04-09 21:20:23 +0000
committerChris Lattner <sabre@nondot.org>2011-04-09 21:20:23 +0000
commitb1145c8cee6ab749f00d07d3d7dab0d1d1fd0c06 (patch)
tree3265cc31e0738ac85c504ab6345fc2928abd5174
parent6c299eadd4ebf7445848508350ea2207f08583c5 (diff)
drive by bug fix: DenseMapInfo::isEqual should be determined according to
isEqual of its members, not operator==. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129233 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/llvm/ADT/DenseMapInfo.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/llvm/ADT/DenseMapInfo.h b/include/llvm/ADT/DenseMapInfo.h
index 25e341bf4f..744b6f4aef 100644
--- a/include/llvm/ADT/DenseMapInfo.h
+++ b/include/llvm/ADT/DenseMapInfo.h
@@ -157,7 +157,10 @@ struct DenseMapInfo<std::pair<T, U> > {
key ^= (key >> 31);
return (unsigned)key;
}
- static bool isEqual(const Pair& LHS, const Pair& RHS) { return LHS == RHS; }
+ static bool isEqual(const Pair &LHS, const Pair &RHS) {
+ return FirstInfo::isEqual(LHS.first, RHS.first) &&
+ SecondInfo::isEqual(LHS.second, RHS.second);
+ }
};
} // end namespace llvm