[llvm] [ObjCopy] Use llvm::reverse (NFC) (PR #135559)
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Sun Apr 13 12:58:25 PDT 2025
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/135559
None
>From c3697c65cbaed450e3af4feb80fb6164d299f966 Mon Sep 17 00:00:00 2001
From: Kazu Hirata <kazu at google.com>
Date: Tue, 1 Apr 2025 22:23:51 -0700
Subject: [PATCH] [ObjCopy] Use llvm::reverse (NFC)
---
llvm/lib/ObjCopy/ELF/ELFObjcopy.cpp | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/llvm/lib/ObjCopy/ELF/ELFObjcopy.cpp b/llvm/lib/ObjCopy/ELF/ELFObjcopy.cpp
index 5a785d7afd1e4..b0ec215aec203 100644
--- a/llvm/lib/ObjCopy/ELF/ELFObjcopy.cpp
+++ b/llvm/lib/ObjCopy/ELF/ELFObjcopy.cpp
@@ -857,8 +857,7 @@ static Error handleArgs(const CommonConfig &Config, const ELFConfig &ELFConfig,
"cannot change section address in a non-relocatable file");
StringMap<AddressUpdate> SectionsToUpdateAddress;
for (const SectionPatternAddressUpdate &PatternUpdate :
- make_range(Config.ChangeSectionAddress.rbegin(),
- Config.ChangeSectionAddress.rend())) {
+ reverse(Config.ChangeSectionAddress)) {
for (SectionBase &Sec : Obj.sections()) {
if (PatternUpdate.SectionPattern.matches(Sec.Name) &&
SectionsToUpdateAddress.try_emplace(Sec.Name, PatternUpdate.Update)
More information about the llvm-commits
mailing list