[lld] r282176 - Simplify. NFC.
Rafael Espindola via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 22 10:23:54 PDT 2016
Author: rafael
Date: Thu Sep 22 12:23:53 2016
New Revision: 282176
URL: http://llvm.org/viewvc/llvm-project?rev=282176&view=rev
Log:
Simplify. NFC.
With the recent changes there should always be a 1:1 correspondence in
the correct order between OutputSections and OutputSectionCommands.
Modified:
lld/trunk/ELF/LinkerScript.cpp
Modified: lld/trunk/ELF/LinkerScript.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/LinkerScript.cpp?rev=282176&r1=282175&r2=282176&view=diff
==============================================================================
--- lld/trunk/ELF/LinkerScript.cpp (original)
+++ lld/trunk/ELF/LinkerScript.cpp Thu Sep 22 12:23:53 2016
@@ -546,9 +546,7 @@ template <class ELFT> void LinkerScript<
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;
}
More information about the llvm-commits
mailing list