summaryrefslogtreecommitdiff
path: root/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp')
-rw-r--r--lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp13
1 files changed, 5 insertions, 8 deletions
diff --git a/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp b/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
index 723a790b87..5d6a2c0f12 100644
--- a/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
+++ b/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
@@ -166,9 +166,7 @@ ObjectImage* RuntimeDyldImpl::loadObject(ObjectImage *InputObject) {
StubMap Stubs;
section_iterator RelocatedSection = SI->getRelocatedSection();
- for (relocation_iterator I = SI->relocation_begin(),
- E = SI->relocation_end();
- I != E; ++I) {
+ for (const RelocationRef &Reloc : SI->relocations()) {
// If it's the first relocation in this section, find its SectionID
if (IsFirstRelocation) {
bool IsCode = false;
@@ -179,7 +177,7 @@ ObjectImage* RuntimeDyldImpl::loadObject(ObjectImage *InputObject) {
IsFirstRelocation = false;
}
- processRelocationRef(SectionID, *I, *Obj, LocalSections, LocalSymbols,
+ processRelocationRef(SectionID, Reloc, *Obj, LocalSections, LocalSymbols,
Stubs);
}
}
@@ -306,13 +304,12 @@ unsigned RuntimeDyldImpl::computeSectionStubBufSize(ObjectImage &Obj,
if (!(RelSecI == Section))
continue;
- for (relocation_iterator I = SI->relocation_begin(),
- E = SI->relocation_end();
- I != E; ++I) {
+ for (const RelocationRef &Reloc : SI->relocations()) {
+ (void)Reloc;
StubBufSize += StubSize;
}
}
-
+
// Get section data size and alignment
uint64_t Alignment64;
uint64_t DataSize;