mirror of
https://github.com/RPCSX/llvm.git
synced 2024-11-24 12:19:53 +00:00
InstrProf: Use a stable sort when reading coverage regions
Keeping regions that start at the same location in insertion order makes this logic easier to test / more deterministic. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228083 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
60705f77f6
commit
3d4b2188af
@ -109,7 +109,7 @@ static void writeCounter(ArrayRef<CounterExpression> Expressions, Counter C,
|
||||
void CoverageMappingWriter::write(raw_ostream &OS) {
|
||||
// Sort the regions in an ascending order by the file id and the starting
|
||||
// location.
|
||||
std::sort(MappingRegions.begin(), MappingRegions.end());
|
||||
std::stable_sort(MappingRegions.begin(), MappingRegions.end());
|
||||
|
||||
// Write out the fileid -> filename mapping.
|
||||
encodeULEB128(VirtualFileMapping.size(), OS);
|
||||
|
Loading…
Reference in New Issue
Block a user