<div dir="ltr"><br><br><div class="gmail_quote"><div dir="ltr">On Tue, Oct 24, 2017 at 1:27 PM Grang, Mandeep Singh <<a href="mailto:mgrang@codeaurora.org">mgrang@codeaurora.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Vedant,<br>
<br>
I am not sure if stable_sort is the correct solution in r316490. Try<br>
calling std::random_shuffle before you do std::stable_sort for<br>
InstantiationSubViews in SourceCoverageView.cpp and you will still see<br>
the two llvm-cov tests failing.<br></blockquote><div><br></div><div>random_shuffle+stable_sort doesn't seem like a test that's necessary to pass, unless I'm missing something.<br><br>stable_sort would be used somewhere where the input order is already well defined (so shuffling it wouldn't simulate expected program behavior).</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
I guess the problem is that InstantiationSubViews is filled from an<br>
unordered container and the input order itself is undefined. So<br>
stable_sort won't help in this case.<br>
<br>
--Mandeep<br>
<br>
<br>
On 10/24/2017 1:04 PM, Vedant Kumar via Phabricator wrote:<br>
> vsk added a comment.<br>
><br>
> @mgrang thanks, should be fixed in r316490.<br>
><br>
><br>
> Repository:<br>
>    rL LLVM<br>
><br>
> <a href="https://reviews.llvm.org/D39245" rel="noreferrer" target="_blank">https://reviews.llvm.org/D39245</a><br>
><br>
><br>
><br>
<br>
</blockquote></div></div>