Use a RelocationRef instead of a relocation_iterator.

No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180723 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Rafael Espindola 2013-04-29 19:03:21 +00:00
parent f2e83499fc
commit ca0e736100
6 changed files with 13 additions and 13 deletions

View File

@ -154,7 +154,7 @@ ObjectImage *RuntimeDyldImpl::loadObject(ObjectBuffer *InputBuffer) {
isFirstRelocation = false; isFirstRelocation = false;
} }
processRelocationRef(SectionID, i, *obj, LocalSections, LocalSymbols, processRelocationRef(SectionID, *i, *obj, LocalSections, LocalSymbols,
Stubs); Stubs);
} }
} }

View File

@ -600,17 +600,17 @@ void RuntimeDyldELF::resolveRelocation(const SectionEntry &Section,
} }
void RuntimeDyldELF::processRelocationRef(unsigned SectionID, void RuntimeDyldELF::processRelocationRef(unsigned SectionID,
relocation_iterator RelI, RelocationRef RelI,
ObjectImage &Obj, ObjectImage &Obj,
ObjSectionToIDMap &ObjSectionToID, ObjSectionToIDMap &ObjSectionToID,
const SymbolTableMap &Symbols, const SymbolTableMap &Symbols,
StubMap &Stubs) { StubMap &Stubs) {
uint64_t RelType; uint64_t RelType;
Check(RelI->getType(RelType)); Check(RelI.getType(RelType));
int64_t Addend; int64_t Addend;
Check(RelI->getAdditionalInfo(Addend)); Check(RelI.getAdditionalInfo(Addend));
SymbolRef Symbol; SymbolRef Symbol;
Check(RelI->getSymbol(Symbol)); Check(RelI.getSymbol(Symbol));
// Obtain the symbol name which is referenced in the relocation // Obtain the symbol name which is referenced in the relocation
StringRef TargetName; StringRef TargetName;
@ -667,7 +667,7 @@ void RuntimeDyldELF::processRelocationRef(unsigned SectionID,
} }
} }
uint64_t Offset; uint64_t Offset;
Check(RelI->getOffset(Offset)); Check(RelI.getOffset(Offset));
DEBUG(dbgs() << "\t\tSectionID: " << SectionID DEBUG(dbgs() << "\t\tSectionID: " << SectionID
<< " Offset: " << Offset << " Offset: " << Offset

View File

@ -71,7 +71,7 @@ protected:
virtual void resolveRelocation(const RelocationEntry &RE, uint64_t Value); virtual void resolveRelocation(const RelocationEntry &RE, uint64_t Value);
virtual void processRelocationRef(unsigned SectionID, virtual void processRelocationRef(unsigned SectionID,
relocation_iterator RelI, RelocationRef RelI,
ObjectImage &Obj, ObjectImage &Obj,
ObjSectionToIDMap &ObjSectionToID, ObjSectionToIDMap &ObjSectionToID,
const SymbolTableMap &Symbols, const SymbolTableMap &Symbols,

View File

@ -282,7 +282,7 @@ protected:
/// \brief Parses the object file relocation and stores it to Relocations /// \brief Parses the object file relocation and stores it to Relocations
/// or SymbolRelocations (this depends on the object file type). /// or SymbolRelocations (this depends on the object file type).
virtual void processRelocationRef(unsigned SectionID, virtual void processRelocationRef(unsigned SectionID,
relocation_iterator RelI, RelocationRef RelI,
ObjectImage &Obj, ObjectImage &Obj,
ObjSectionToIDMap &ObjSectionToID, ObjSectionToIDMap &ObjSectionToID,
const SymbolTableMap &Symbols, const SymbolTableMap &Symbols,

View File

@ -214,14 +214,14 @@ bool RuntimeDyldMachO::resolveARMRelocation(uint8_t *LocalAddress,
} }
void RuntimeDyldMachO::processRelocationRef(unsigned SectionID, void RuntimeDyldMachO::processRelocationRef(unsigned SectionID,
relocation_iterator RelI, RelocationRef RelI,
ObjectImage &Obj, ObjectImage &Obj,
ObjSectionToIDMap &ObjSectionToID, ObjSectionToIDMap &ObjSectionToID,
const SymbolTableMap &Symbols, const SymbolTableMap &Symbols,
StubMap &Stubs) { StubMap &Stubs) {
const ObjectFile *OF = Obj.getObjectFile(); const ObjectFile *OF = Obj.getObjectFile();
const MachOObjectFile *MachO = static_cast<const MachOObjectFile*>(OF); const MachOObjectFile *MachO = static_cast<const MachOObjectFile*>(OF);
macho::RelocationEntry RE = MachO->getRelocation(RelI->getRawDataRefImpl()); macho::RelocationEntry RE = MachO->getRelocation(RelI.getRawDataRefImpl());
uint32_t RelType = MachO->getAnyRelocationType(RE); uint32_t RelType = MachO->getAnyRelocationType(RE);
RelocationValueRef Value; RelocationValueRef Value;
@ -233,7 +233,7 @@ void RuntimeDyldMachO::processRelocationRef(unsigned SectionID,
if (isExtern) { if (isExtern) {
// Obtain the symbol name which is referenced in the relocation // Obtain the symbol name which is referenced in the relocation
SymbolRef Symbol; SymbolRef Symbol;
RelI->getSymbol(Symbol); RelI.getSymbol(Symbol);
StringRef TargetName; StringRef TargetName;
Symbol.getName(TargetName); Symbol.getName(TargetName);
// First search for the symbol in the local symbol table // First search for the symbol in the local symbol table
@ -277,7 +277,7 @@ void RuntimeDyldMachO::processRelocationRef(unsigned SectionID,
} }
uint64_t Offset; uint64_t Offset;
RelI->getOffset(Offset); RelI.getOffset(Offset);
if (Arch == Triple::arm && (RelType & 0xf) == macho::RIT_ARM_Branch24Bit) { if (Arch == Triple::arm && (RelType & 0xf) == macho::RIT_ARM_Branch24Bit) {
// This is an ARM branch relocation, need to use a stub function. // This is an ARM branch relocation, need to use a stub function.

View File

@ -49,7 +49,7 @@ protected:
int64_t Addend); int64_t Addend);
virtual void processRelocationRef(unsigned SectionID, virtual void processRelocationRef(unsigned SectionID,
relocation_iterator RelI, RelocationRef RelI,
ObjectImage &Obj, ObjectImage &Obj,
ObjSectionToIDMap &ObjSectionToID, ObjSectionToIDMap &ObjSectionToID,
const SymbolTableMap &Symbols, const SymbolTableMap &Symbols,