Will Dietz found and reported that lld does not compile with gcc 6.2.0,
more details https://llvm.org/bugs/show_bug.cgi?id=30438
And confirmed this change fixes the issue.
llvm-svn: 281900
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() {