diff options
-rw-r--r-- | lld/ELF/LinkerScript.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lld/ELF/LinkerScript.cpp b/lld/ELF/LinkerScript.cpp index 6cc932e3864..7a326c4b6bb 100644 --- a/lld/ELF/LinkerScript.cpp +++ b/lld/ELF/LinkerScript.cpp @@ -447,8 +447,8 @@ void LinkerScript<ELFT>::assignOffsets(OutputSectionCommand *Cmd) { switchTo(Base); Dot += CurOutSec->getSize(); } - for (auto I = E, E = Cmd->Commands.end(); I != E; ++I) - process(**I); + std::for_each(E, Cmd->Commands.end(), + [this](std::unique_ptr<BaseCommand> &B) { process(*B.get()); }); } template <class ELFT> void LinkerScript<ELFT>::assignAddresses() { |