summaryrefslogtreecommitdiffstats
path: root/lld/ELF/LinkerScript.cpp
diff options
context:
space:
mode:
authorGeorge Rimar <grimar@accesssoftek.com>2016-09-19 13:27:31 +0000
committerGeorge Rimar <grimar@accesssoftek.com>2016-09-19 13:27:31 +0000
commitb31dd37005f51330658b56c0c17eef14ca974125 (patch)
treeac7fd1da23e463a412e20d0a6f72e483e292e9bf /lld/ELF/LinkerScript.cpp
parenteb62b17d8f6cd0eebef9563453c61826567d9708 (diff)
downloadbcm5719-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
Diffstat (limited to 'lld/ELF/LinkerScript.cpp')
-rw-r--r--lld/ELF/LinkerScript.cpp4
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() {
OpenPOWER on IntegriCloud