summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Object/COFFObjectFile.cpp
diff options
context:
space:
mode:
authorJuergen Ributzka <juergen@apple.com>2014-03-21 07:26:41 +0000
committerJuergen Ributzka <juergen@apple.com>2014-03-21 07:26:41 +0000
commit046709f06ba0ee770c3abd78abaa0e1a679ae64f (patch)
treedaf1bf880469bf2df1f798bce8f5bc057108d80d /llvm/lib/Object/COFFObjectFile.cpp
parent997a923eeb3972ff2bcb4122d52bee310d97dce2 (diff)
downloadbcm5719-llvm-046709f06ba0ee770c3abd78abaa0e1a679ae64f.tar.gz
bcm5719-llvm-046709f06ba0ee770c3abd78abaa0e1a679ae64f.zip
[RuntimeDyld] Allow processRelocationRef to process more than one relocation entry at a time.
Some targets require more than one relocation entry to perform a relocation. This change allows processRelocationRef to process more than one relocation entry at a time by passing the relocation iterator itself instead of just the relocation entry. Related to <rdar://problem/16199095> llvm-svn: 204439
Diffstat (limited to 'llvm/lib/Object/COFFObjectFile.cpp')
-rw-r--r--llvm/lib/Object/COFFObjectFile.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/lib/Object/COFFObjectFile.cpp b/llvm/lib/Object/COFFObjectFile.cpp
index 5ad8f8443f7..43913e44857 100644
--- a/llvm/lib/Object/COFFObjectFile.cpp
+++ b/llvm/lib/Object/COFFObjectFile.cpp
@@ -410,6 +410,11 @@ relocation_iterator COFFObjectFile::section_rel_end(DataRefImpl Ref) const {
return relocation_iterator(RelocationRef(Ret, this));
}
+bool COFFObjectFile::section_rel_empty(DataRefImpl Ref) const {
+ const coff_section *Sec = toSec(Ref);
+ return Sec->NumberOfRelocations == 0;
+}
+
// Initialize the pointer to the symbol table.
error_code COFFObjectFile::initSymbolTablePtr() {
if (error_code EC = getObject(
OpenPOWER on IntegriCloud