aboutsummaryrefslogtreecommitdiff
path: root/llvm/tools/llvm-objcopy/ELF/Object.cpp
diff options
context:
space:
mode:
authorGeorgii Rymar <grimar@accesssoftek.com>2020-04-13 14:46:41 +0300
committerGeorgii Rymar <grimar@accesssoftek.com>2020-04-14 14:11:02 +0300
commit1647ff6e2753026f8a1e21c60d37b83602520b64 (patch)
tree9bef856966e757bd7468c1e48f709ce38287e414 /llvm/tools/llvm-objcopy/ELF/Object.cpp
parent58516718fc66de01f1221c7d30b06c297296a264 (diff)
downloadllvm-1647ff6e2753026f8a1e21c60d37b83602520b64.zip
llvm-1647ff6e2753026f8a1e21c60d37b83602520b64.tar.gz
llvm-1647ff6e2753026f8a1e21c60d37b83602520b64.tar.bz2
[ADT/STLExtras.h] - Add llvm::is_sorted wrapper and update callers.
It can be used to avoid passing the begin and end of a range. This makes the code shorter and it is consistent with another wrappers we already have. Differential revision: https://reviews.llvm.org/D78016
Diffstat (limited to 'llvm/tools/llvm-objcopy/ELF/Object.cpp')
-rw-r--r--llvm/tools/llvm-objcopy/ELF/Object.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/tools/llvm-objcopy/ELF/Object.cpp b/llvm/tools/llvm-objcopy/ELF/Object.cpp
index 14ac7bb..bc590fa 100644
--- a/llvm/tools/llvm-objcopy/ELF/Object.cpp
+++ b/llvm/tools/llvm-objcopy/ELF/Object.cpp
@@ -1902,8 +1902,7 @@ static void orderSegments(std::vector<Segment *> &Segments) {
// returns an Offset one past the end of the last segment.
static uint64_t layoutSegments(std::vector<Segment *> &Segments,
uint64_t Offset) {
- assert(std::is_sorted(std::begin(Segments), std::end(Segments),
- compareSegmentsByOffset));
+ assert(llvm::is_sorted(Segments, compareSegmentsByOffset));
// The only way a segment should move is if a section was between two
// segments and that section was removed. If that section isn't in a segment
// then it's acceptable, but not ideal, to simply move it to after the