<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Oct 24, 2017, at 1:37 PM, David Blaikie <<a href="mailto:dblaikie@gmail.com" class="">dblaikie@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><br class=""><br class=""><div class="gmail_quote"><div dir="ltr" class="">On Tue, Oct 24, 2017 at 1:27 PM Grang, Mandeep Singh <<a href="mailto:mgrang@codeaurora.org" class="">mgrang@codeaurora.org</a>> wrote:<br class=""></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Vedant,<br class="">
<br class="">
I am not sure if stable_sort is the correct solution in r316490. Try<br class="">
calling std::random_shuffle before you do std::stable_sort for<br class="">
InstantiationSubViews in SourceCoverageView.cpp and you will still see<br class="">
the two llvm-cov tests failing.<br class=""></blockquote><div class=""><br class=""></div><div class="">random_shuffle+stable_sort doesn't seem like a test that's necessary to pass, unless I'm missing something.<br class=""></div></div></div></div></blockquote><div><blockquote type="cite" class=""><br class=""></blockquote></div></div><div><blockquote type="cite" class=""><div class=""><div dir="ltr" class=""><div class="gmail_quote"><div class="">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></div></blockquote><div><br class=""></div>Right, I don't think the stable_sort could be expected to preserve the input order after the container has been shuffled.</div><div><br class=""></div><div>vedant</div><div><br class=""><blockquote type="cite" class=""><div class=""><div dir="ltr" class=""><div class="gmail_quote"><div class=""> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br class="">
I guess the problem is that InstantiationSubViews is filled from an<br class="">
unordered container and the input order itself is undefined. So<br class="">
stable_sort won't help in this case.<br class="">
<br class="">
--Mandeep<br class="">
<br class="">
<br class="">
On 10/24/2017 1:04 PM, Vedant Kumar via Phabricator wrote:<br class="">
> vsk added a comment.<br class="">
><br class="">
> @mgrang thanks, should be fixed in r316490.<br class="">
><br class="">
><br class="">
> Repository:<br class="">
>    rL LLVM<br class="">
><br class="">
> <a href="https://reviews.llvm.org/D39245" rel="noreferrer" target="_blank" class="">https://reviews.llvm.org/D39245</a><br class="">
><br class="">
><br class="">
><br class="">
<br class="">
</blockquote></div></div>
</div></blockquote></div><br class=""></body></html>