summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2016-09-22 17:23:53 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2016-09-22 17:23:53 +0000
commit1998ee53f03bd70e811760a6aeb583ee4f4b033a (patch)
tree8c3303f908536cb8ab3cbefdc5dc474c5f95536c
parent1531f30ccc28b21915902a00be8792c39d35410a (diff)
downloadbcm5719-llvm-1998ee53f03bd70e811760a6aeb583ee4f4b033a.tar.gz
bcm5719-llvm-1998ee53f03bd70e811760a6aeb583ee4f4b033a.zip
Simplify. NFC.
With the recent changes there should always be a 1:1 correspondence in the correct order between OutputSections and OutputSectionCommands. llvm-svn: 282176
-rw-r--r--lld/ELF/LinkerScript.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/lld/ELF/LinkerScript.cpp b/lld/ELF/LinkerScript.cpp
index d4577c2f41d..cfb1fb30e91 100644
--- a/lld/ELF/LinkerScript.cpp
+++ b/lld/ELF/LinkerScript.cpp
@@ -546,9 +546,7 @@ template <class ELFT> void LinkerScript<ELFT>::assignAddresses() {
Opt.Commands.insert(CmdIter,
llvm::make_unique<OutputSectionCommand>(Name));
} else {
- // If linker script lists alloc/non-alloc sections is the wrong order,
- // this does a rotate to bring the desired command in place.
- std::rotate(CmdIter, Pos, Pos + 1);
+ assert(Pos == CmdIter && "Section order doesn't match the linker script");
}
++CmdIndex;
}
OpenPOWER on IntegriCloud