Skip to content

Commit af1c6c8

Browse files
authored
Update SpecialCaseList.cpp
1 parent 5c2363d commit af1c6c8

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

llvm/lib/Support/SpecialCaseList.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,11 @@ Error SpecialCaseList::Matcher::insert(StringRef Pattern, unsigned LineNumber,
6363
.moveInto(Pair.first))
6464
return Err;
6565
Pair.second = LineNumber;
66+
} else {
67+
// We should update the new line number if an entry with the same pattern
68+
// repeats.
69+
auto &Pair = It->getValue();
70+
Pair.second = LineNumber;
6671
}
6772
return Error::success();
6873
}

0 commit comments

Comments
 (0)