From: Mandeep Singh Grang Date: Mon, 16 Jul 2018 17:26:37 +0000 (+0000) Subject: [llvm] Change 2 instances of std::sort to llvm::sort X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=bffcc487e3e2637ad537ac546da472232358e1a6;p=llvm [llvm] Change 2 instances of std::sort to llvm::sort git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@337192 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/MIRCanonicalizerPass.cpp b/lib/CodeGen/MIRCanonicalizerPass.cpp index af6fc117c89..fa43d13b1b8 100644 --- a/lib/CodeGen/MIRCanonicalizerPass.cpp +++ b/lib/CodeGen/MIRCanonicalizerPass.cpp @@ -134,7 +134,7 @@ rescheduleLexographically(std::vector instructions, StringInstrMap.push_back({(i == std::string::npos) ? S : S.substr(i), II}); } - std::sort(StringInstrMap.begin(), StringInstrMap.end(), + llvm::sort(StringInstrMap.begin(), StringInstrMap.end(), [](const StringInstrPair &a, const StringInstrPair &b) -> bool { return (a.first < b.first); }); diff --git a/lib/DebugInfo/PDB/Native/GSIStreamBuilder.cpp b/lib/DebugInfo/PDB/Native/GSIStreamBuilder.cpp index 2f0f76b38b7..58efc2256ae 100644 --- a/lib/DebugInfo/PDB/Native/GSIStreamBuilder.cpp +++ b/lib/DebugInfo/PDB/Native/GSIStreamBuilder.cpp @@ -144,7 +144,7 @@ void GSIHashStreamBuilder::finalizeBuckets(uint32_t RecordZeroOffset) { // can properly early-out when it detects the record won't be found. The // algorithm used here corredsponds to the function // caseInsensitiveComparePchPchCchCch in the reference implementation. - std::sort(Bucket.begin(), Bucket.end(), + llvm::sort(Bucket.begin(), Bucket.end(), [](const std::pair &Left, const std::pair &Right) { return gsiRecordLess(Left.first, Right.first);