[lld] r191867 - [Core] Fix unstable sort for unordered atoms.

Sean Silva silvas at purdue.edu
Sun Oct 6 19:04:51 PDT 2013


test?


On Wed, Oct 2, 2013 at 9:26 PM, Michael J. Spencer <bigcheesegs at gmail.com>wrote:

> Author: mspencer
> Date: Wed Oct  2 20:26:48 2013
> New Revision: 191867
>
> URL: http://llvm.org/viewvc/llvm-project?rev=191867&view=rev
> Log:
> [Core] Fix unstable sort for unordered atoms.
>
> Modified:
>     lld/trunk/lib/Passes/LayoutPass.cpp
>
> Modified: lld/trunk/lib/Passes/LayoutPass.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/lld/trunk/lib/Passes/LayoutPass.cpp?rev=191867&r1=191866&r2=191867&view=diff
>
> ==============================================================================
> --- lld/trunk/lib/Passes/LayoutPass.cpp (original)
> +++ lld/trunk/lib/Passes/LayoutPass.cpp Wed Oct  2 20:26:48 2013
> @@ -527,7 +527,7 @@ void LayoutPass::perform(MutableFile &me
>    });
>
>    // sort the atoms
> -  std::sort(atomRange.begin(), atomRange.end(), _compareAtoms);
> +  std::stable_sort(atomRange.begin(), atomRange.end(), _compareAtoms);
>
>    DEBUG({
>      llvm::dbgs() << "sorted atoms:\n";
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20131006/012c6e35/attachment.html>


More information about the llvm-commits mailing list