From d42357007da6f70e91553685324b404428fcd290 Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Sun, 6 Nov 2022 08:39:41 -0800 Subject: [PATCH] [lld] Use llvm::reverse (NFC) --- lld/ELF/Writer.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/lld/ELF/Writer.cpp b/lld/ELF/Writer.cpp index 918490b..2d99f6d 100644 --- a/lld/ELF/Writer.cpp +++ b/lld/ELF/Writer.cpp @@ -1794,10 +1794,9 @@ static void removeUnusedSyntheticSections() { // all regular ones. Reverse iterate to find the first synthetic section // after a non-synthetic one which will be our starting point. auto start = - std::find_if( - ctx.inputSections.rbegin(), ctx.inputSections.rend(), - [](InputSectionBase *s) { return !isa(s); }) - .base(); + llvm::find_if(llvm::reverse(ctx.inputSections), [](InputSectionBase *s) { + return !isa(s); + }).base(); // Remove unused synthetic sections from ctx.inputSections; DenseSet unused; -- 2.7.4