Skip to content

Commit 91c8f4b

Browse files
author
Mingsheng Hong
committed
Addressed feedback.
1 parent 4764120 commit 91c8f4b

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

lib/SILOptimizer/Mandatory/TFPartition.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -612,7 +612,12 @@ template<typename T> struct DenseMapInfo;
612612
template<> struct DenseMapInfo<SourceRange> {
613613
static SourceRange getEmptyKey() { return SourceRange(); }
614614

615-
static SourceRange getTombstoneKey() { return SourceRange(); }
615+
static SourceRange getTombstoneKey() {
616+
// Make this different from empty key. See for context:
617+
// http://lists.llvm.org/pipermail/llvm-dev/2015-July/088744.html
618+
return SourceRange(SourceLoc(
619+
SMLoc::getFromPointer(DenseMapInfo<const char *>::getTombstoneKey())));
620+
}
616621

617622
static unsigned getHashValue(const SourceRange &Val) {
618623
return hash_combine(

0 commit comments

Comments
 (0)