From 046709f06ba0ee770c3abd78abaa0e1a679ae64f Mon Sep 17 00:00:00 2001 From: Juergen Ributzka Date: Fri, 21 Mar 2014 07:26:41 +0000 Subject: [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 llvm-svn: 204439 --- llvm/lib/Object/COFFObjectFile.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'llvm/lib/Object/COFFObjectFile.cpp') 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( -- cgit v1.2.3