This is an archive of the discontinued LLVM Phabricator instance.

[Coverage] Make sorting criteria for CounterMappingRegions local.
ClosedPublic

Authored by ikudrin on Aug 30 2016, 9:04 AM.

Details

Summary

Move the comparison function into the only place there it is used,
i.e. the call to std::stable_sort in CoverageMappingWriter::write().

Add sorting by region kinds as it is required to ensure stable order
in our tests and to simplify D23987.

Diff Detail

Event Timeline

ikudrin updated this revision to Diff 69703.Aug 30 2016, 9:04 AM
ikudrin retitled this revision from to [Coverage] Make sorting criteria for CounterMappingRegions local..
ikudrin updated this object.
ikudrin added reviewers: vsk, bogner.
ikudrin added a subscriber: llvm-commits.
vsk accepted this revision.Aug 30 2016, 9:48 AM
vsk edited edge metadata.

From D23987:

I don't want to make more changes in the program's behaviour than needed.

Makes sense, this lgtm.

This revision is now accepted and ready to land.Aug 30 2016, 9:48 AM
This revision was automatically updated to reflect the committed changes.