mirror of
https://github.com/intel/llvm.git
synced 2026-01-19 09:31:59 +08:00
Simplify. NFC.
It doesn't matter which direction we rotate and we haven't really started optimizing the linker script code, so keep this simple. llvm-svn: 282166
This commit is contained in:
@@ -547,9 +547,8 @@ template <class ELFT> void LinkerScript<ELFT>::assignAddresses() {
|
||||
llvm::make_unique<OutputSectionCommand>(Name));
|
||||
} else {
|
||||
// If linker script lists alloc/non-alloc sections is the wrong order,
|
||||
// this does a right rotate to bring the desired command in place.
|
||||
auto RPos = llvm::make_reverse_iterator(Pos + 1);
|
||||
std::rotate(RPos, RPos + 1, llvm::make_reverse_iterator(CmdIter));
|
||||
// this does a rotate to bring the desired command in place.
|
||||
std::rotate(CmdIter, Pos, Pos + 1);
|
||||
}
|
||||
++CmdIndex;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user