From: Benjamin Kramer Date: Thu, 22 Aug 2019 17:32:16 +0000 (+0000) Subject: Retire llvm::less_ptr. llvm::deref is much more flexible. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0693d434731f0275cd8045f6e13f02dc867622d6;p=clang Retire llvm::less_ptr. llvm::deref is much more flexible. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@369675 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Serialization/ASTWriter.cpp b/lib/Serialization/ASTWriter.cpp index 0981adcec1..019042a130 100644 --- a/lib/Serialization/ASTWriter.cpp +++ b/lib/Serialization/ASTWriter.cpp @@ -2506,7 +2506,7 @@ void ASTWriter::WritePreprocessor(const Preprocessor &PP, bool IsModule) { MacroIdentifiers.push_back(Id.second); // Sort the set of macro definitions that need to be serialized by the // name of the macro, to provide a stable ordering. - llvm::sort(MacroIdentifiers, llvm::less_ptr()); + llvm::sort(MacroIdentifiers, llvm::deref>()); // Emit the macro directives as a list and associate the offset with the // identifier they belong to. @@ -3748,7 +3748,7 @@ void ASTWriter::WriteIdentifierTable(Preprocessor &PP, IIs.push_back(ID.second); // Sort the identifiers lexicographically before getting them references so // that their order is stable. - llvm::sort(IIs, llvm::less_ptr()); + llvm::sort(IIs, llvm::deref>()); for (const IdentifierInfo *II : IIs) if (Trait.isInterestingNonMacroIdentifier(II)) getIdentifierRef(II); @@ -4924,7 +4924,7 @@ ASTFileSignature ASTWriter::WriteASTCore(Sema &SemaRef, StringRef isysroot, IIs.push_back(II); } // Sort the identifiers to visit based on their name. - llvm::sort(IIs, llvm::less_ptr()); + llvm::sort(IIs, llvm::deref>()); for (const IdentifierInfo *II : IIs) { for (IdentifierResolver::iterator D = SemaRef.IdResolver.begin(II), DEnd = SemaRef.IdResolver.end(); diff --git a/utils/TableGen/NeonEmitter.cpp b/utils/TableGen/NeonEmitter.cpp index 887113e629..b21f6b1bad 100644 --- a/utils/TableGen/NeonEmitter.cpp +++ b/utils/TableGen/NeonEmitter.cpp @@ -2456,7 +2456,7 @@ void NeonEmitter::run(raw_ostream &OS) { for (auto *I : Defs) I->indexBody(); - llvm::stable_sort(Defs, llvm::less_ptr()); + llvm::stable_sort(Defs, llvm::deref>()); // Only emit a def when its requirements have been met. // FIXME: This loop could be made faster, but it's fast enough for now. @@ -2563,7 +2563,7 @@ void NeonEmitter::runFP16(raw_ostream &OS) { for (auto *I : Defs) I->indexBody(); - llvm::stable_sort(Defs, llvm::less_ptr()); + llvm::stable_sort(Defs, llvm::deref>()); // Only emit a def when its requirements have been met. // FIXME: This loop could be made faster, but it's fast enough for now.