From 88e7be2e6b8e9dfbc20094e833b066c58c1ac1bc Mon Sep 17 00:00:00 2001 From: Benjamin Kramer Date: Sat, 16 Jun 2018 12:11:34 +0000 Subject: [ELF] Pass callables by function_ref No need to create a heavyweight std::function if it's not stored. No functionality change intended. llvm-svn: 334885 --- lld/ELF/OutputSections.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lld/ELF/OutputSections.cpp') diff --git a/lld/ELF/OutputSections.cpp b/lld/ELF/OutputSections.cpp index 31e1d196db4..8253b18b486 100644 --- a/lld/ELF/OutputSections.cpp +++ b/lld/ELF/OutputSections.cpp @@ -139,7 +139,7 @@ void OutputSection::addSection(InputSection *IS) { } static void sortByOrder(MutableArrayRef In, - std::function Order) { + llvm::function_ref Order) { typedef std::pair Pair; auto Comp = [](const Pair &A, const Pair &B) { return A.first < B.first; }; @@ -162,7 +162,7 @@ bool OutputSection::classof(const BaseCommand *C) { return C->Kind == OutputSectionKind; } -void OutputSection::sort(std::function Order) { +void OutputSection::sort(llvm::function_ref Order) { assert(Live); for (BaseCommand *B : SectionCommands) if (auto *ISD = dyn_cast(B)) -- cgit v1.2.3