summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2016-09-22 15:25:21 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2016-09-22 15:25:21 +0000
commit2644208381d4aaee092627f173be315072dfa8ff (patch)
tree2a45fcb236addc526637bb1060afbffab1cfb02e
parent5d68aa7913fc5a66ecbd6388d3ed02ab1ffec7be (diff)
downloadbcm5719-llvm-2644208381d4aaee092627f173be315072dfa8ff.tar.gz
bcm5719-llvm-2644208381d4aaee092627f173be315072dfa8ff.zip
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
-rw-r--r--lld/ELF/LinkerScript.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/lld/ELF/LinkerScript.cpp b/lld/ELF/LinkerScript.cpp
index acdc43519b8..37b51ce1924 100644
--- a/lld/ELF/LinkerScript.cpp
+++ b/lld/ELF/LinkerScript.cpp
@@ -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;
}
OpenPOWER on IntegriCloud