[lld] Use llvm::reverse (NFC)
This commit is contained in:
parent
f5a2ef80fa
commit
d42357007d
|
@ -1794,10 +1794,9 @@ static void removeUnusedSyntheticSections() {
|
||||||
// all regular ones. Reverse iterate to find the first synthetic section
|
// all regular ones. Reverse iterate to find the first synthetic section
|
||||||
// after a non-synthetic one which will be our starting point.
|
// after a non-synthetic one which will be our starting point.
|
||||||
auto start =
|
auto start =
|
||||||
std::find_if(
|
llvm::find_if(llvm::reverse(ctx.inputSections), [](InputSectionBase *s) {
|
||||||
ctx.inputSections.rbegin(), ctx.inputSections.rend(),
|
return !isa<SyntheticSection>(s);
|
||||||
[](InputSectionBase *s) { return !isa<SyntheticSection>(s); })
|
}).base();
|
||||||
.base();
|
|
||||||
|
|
||||||
// Remove unused synthetic sections from ctx.inputSections;
|
// Remove unused synthetic sections from ctx.inputSections;
|
||||||
DenseSet<InputSectionBase *> unused;
|
DenseSet<InputSectionBase *> unused;
|
||||||
|
|
Loading…
Reference in New Issue