From: Fangrui Song Date: Fri, 19 Apr 2019 05:49:29 +0000 (+0000) Subject: [MergeFunc] Use less_first() as the comparator of Schwartzian transform X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=52331e06039fbfd84f9278b997748efc66b3048e;p=llvm [MergeFunc] Use less_first() as the comparator of Schwartzian transform git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358738 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Transforms/IPO/MergeFunctions.cpp b/lib/Transforms/IPO/MergeFunctions.cpp index d0c16138f9e..8a40f0479f2 100644 --- a/lib/Transforms/IPO/MergeFunctions.cpp +++ b/lib/Transforms/IPO/MergeFunctions.cpp @@ -403,12 +403,7 @@ bool MergeFunctions::runOnModule(Module &M) { } } - std::stable_sort( - HashedFuncs.begin(), HashedFuncs.end(), - [](const std::pair &a, - const std::pair &b) { - return a.first < b.first; - }); + std::stable_sort(HashedFuncs.begin(), HashedFuncs.end(), less_first()); auto S = HashedFuncs.begin(); for (auto I = HashedFuncs.begin(), IE = HashedFuncs.end(); I != IE; ++I) {