mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-03-04 05:31:51 +00:00
[RuntimeDydlELF] Use range-based loop.
Differential Revision: http://reviews.llvm.org/D10165 Reviewed by: rafael git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238804 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
f7e0685b9a
commit
69aef63931
@ -714,17 +714,15 @@ void RuntimeDyldELF::findPPC64TOCSection(const ObjectFile &Obj,
|
||||
|
||||
// The TOC consists of sections .got, .toc, .tocbss, .plt in that
|
||||
// order. The TOC starts where the first of these sections starts.
|
||||
for (section_iterator si = Obj.section_begin(), se = Obj.section_end();
|
||||
si != se; ++si) {
|
||||
|
||||
for (auto &Section: Obj.sections()) {
|
||||
StringRef SectionName;
|
||||
check(si->getName(SectionName));
|
||||
check(Section.getName(SectionName));
|
||||
|
||||
if (SectionName == ".got"
|
||||
|| SectionName == ".toc"
|
||||
|| SectionName == ".tocbss"
|
||||
|| SectionName == ".plt") {
|
||||
Rel.SectionID = findOrEmitSection(Obj, *si, false, LocalSections);
|
||||
Rel.SectionID = findOrEmitSection(Obj, Section, false, LocalSections);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user