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
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);