diff options
author | George Rimar <grimar@accesssoftek.com> | 2016-09-19 13:27:31 +0000 |
---|---|---|
committer | George Rimar <grimar@accesssoftek.com> | 2016-09-19 13:27:31 +0000 |
commit | b31dd37005f51330658b56c0c17eef14ca974125 (patch) | |
tree | ac7fd1da23e463a412e20d0a6f72e483e292e9bf | |
parent | eb62b17d8f6cd0eebef9563453c61826567d9708 (diff) | |
download | bcm5719-llvm-b31dd37005f51330658b56c0c17eef14ca974125.tar.gz bcm5719-llvm-b31dd37005f51330658b56c0c17eef14ca974125.zip |
[ELF] - LinkerScript: Add workaround for gcc 6.2.0 failure w/auto
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
-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() { |