mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-31 12:41:49 +01:00
[llvm-cov] Use a stable sort on sub-views
We need to use a stable sort on instantiation and expansion sub-views to produce consistent output. Fortunately, we've gotten lucky and the tests have checks for the stable order. This is needed to unblock D39245. Once that lands, we'll have better test coverage for sort non-determinism. llvm-svn: 316490
This commit is contained in:
parent
1cde06b6be
commit
94fdbe848b
@ -178,8 +178,8 @@ void SourceCoverageView::print(raw_ostream &OS, bool WholeFile,
|
||||
|
||||
// We need the expansions and instantiations sorted so we can go through them
|
||||
// while we iterate lines.
|
||||
std::sort(ExpansionSubViews.begin(), ExpansionSubViews.end());
|
||||
std::sort(InstantiationSubViews.begin(), InstantiationSubViews.end());
|
||||
std::stable_sort(ExpansionSubViews.begin(), ExpansionSubViews.end());
|
||||
std::stable_sort(InstantiationSubViews.begin(), InstantiationSubViews.end());
|
||||
auto NextESV = ExpansionSubViews.begin();
|
||||
auto EndESV = ExpansionSubViews.end();
|
||||
auto NextISV = InstantiationSubViews.begin();
|
||||
|
Loading…
x
Reference in New Issue
Block a user