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 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)