diff options
Diffstat (limited to 'llvm/lib/IR')
| -rw-r--r-- | llvm/lib/IR/MDBuilder.cpp | 4 | ||||
| -rw-r--r-- | llvm/lib/IR/Metadata.cpp | 5 |
2 files changed, 2 insertions, 7 deletions
diff --git a/llvm/lib/IR/MDBuilder.cpp b/llvm/lib/IR/MDBuilder.cpp index f65ac31ca5a..14bcb3a29b0 100644 --- a/llvm/lib/IR/MDBuilder.cpp +++ b/llvm/lib/IR/MDBuilder.cpp @@ -68,9 +68,7 @@ MDNode *MDBuilder::createFunctionEntryCount( Ops.push_back(createConstant(ConstantInt::get(Int64Ty, Count))); if (Imports) { SmallVector<GlobalValue::GUID, 2> OrderID(Imports->begin(), Imports->end()); - std::stable_sort(OrderID.begin(), OrderID.end(), - [] (GlobalValue::GUID A, GlobalValue::GUID B) { - return A < B;}); + llvm::stable_sort(OrderID); for (auto ID : OrderID) Ops.push_back(createConstant(ConstantInt::get(Int64Ty, ID))); } diff --git a/llvm/lib/IR/Metadata.cpp b/llvm/lib/IR/Metadata.cpp index 70ffa652bfb..748a2238e64 100644 --- a/llvm/lib/IR/Metadata.cpp +++ b/llvm/lib/IR/Metadata.cpp @@ -1179,10 +1179,7 @@ void MDGlobalAttachmentMap::getAll( // Sort the resulting array so it is stable with respect to metadata IDs. We // need to preserve the original insertion order though. - std::stable_sort( - Result.begin(), Result.end(), - [](const std::pair<unsigned, MDNode *> &A, - const std::pair<unsigned, MDNode *> &B) { return A.first < B.first; }); + llvm::stable_sort(Result, less_first()); } void Instruction::setMetadata(StringRef Kind, MDNode *Node) { |

