summaryrefslogtreecommitdiff
path: root/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2014-04-03 22:42:22 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2014-04-03 22:42:22 +0000
commit67c46d286f6a56aade98c3b7296270b54ae8dc7e (patch)
tree495b12eedcc76261489ec340f65b5e9690f1d7a7 /lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
parentda7ea68f0d5b6ca3e187ee463864c36a30a238f0 (diff)
downloadllvm-67c46d286f6a56aade98c3b7296270b54ae8dc7e.tar.gz
llvm-67c46d286f6a56aade98c3b7296270b54ae8dc7e.tar.bz2
llvm-67c46d286f6a56aade98c3b7296270b54ae8dc7e.tar.xz
Remove section_rel_empty. Just compare begin() and end() instead.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205577 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp')
-rw-r--r--lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp b/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
index 986d3a0a35..ea5d709e35 100644
--- a/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
+++ b/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
@@ -163,7 +163,10 @@ ObjectImage *RuntimeDyldImpl::loadObject(ObjectImage *InputObject) {
StubMap Stubs;
section_iterator RelocatedSection = SI->getRelocatedSection();
- if (SI->relocation_empty() && !ProcessAllSections)
+ relocation_iterator I = SI->relocation_begin();
+ relocation_iterator E = SI->relocation_end();
+
+ if (I == E && !ProcessAllSections)
continue;
bool IsCode = false;
@@ -172,8 +175,7 @@ ObjectImage *RuntimeDyldImpl::loadObject(ObjectImage *InputObject) {
findOrEmitSection(*Obj, *RelocatedSection, IsCode, LocalSections);
DEBUG(dbgs() << "\tSectionID: " << SectionID << "\n");
- for (relocation_iterator I = SI->relocation_begin(),
- E = SI->relocation_end(); I != E;)
+ for (; I != E;)
I = processRelocationRef(SectionID, I, *Obj, LocalSections, LocalSymbols,
Stubs);
}