DenseMap.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128994
91177308-0d34-0410-b5e6-
96231b3b80d8
class DebugLoc {
friend struct DenseMapInfo<DebugLoc>;
+ /// getEmptyKey() - A private constructor that returns an unknown that is
+ /// not equal to the tombstone key or DebugLoc().
+ static DebugLoc getEmptyKey() {
+ DebugLoc DL;
+ DL.LineCol = -1;
+ return DL;
+ }
+
/// getTombstoneKey() - A private constructor that returns an unknown that
- /// is distinguishable from the usual one.
+ /// is not equal to the empty key or DebugLoc().
static DebugLoc getTombstoneKey() {
DebugLoc DL;
- DL.LineCol = -1;
+ DL.LineCol = -2;
return DL;
}
//===----------------------------------------------------------------------===//
DebugLoc DenseMapInfo<DebugLoc>::getEmptyKey() {
- return DebugLoc();
+ return DebugLoc::getEmptyKey();
}
DebugLoc DenseMapInfo<DebugLoc>::getTombstoneKey() {