[llvm] r180723 - Use a RelocationRef instead of a relocation_iterator.
Rafael Espindola
rafael.espindola at gmail.com
Mon Apr 29 12:03:21 PDT 2013
Author: rafael
Date: Mon Apr 29 14:03:21 2013
New Revision: 180723
URL: http://llvm.org/viewvc/llvm-project?rev=180723&view=rev
Log:
Use a RelocationRef instead of a relocation_iterator.
No functionality change.
Modified:
llvm/trunk/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
llvm/trunk/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp
llvm/trunk/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.h
llvm/trunk/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldImpl.h
llvm/trunk/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp
llvm/trunk/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.h
Modified: llvm/trunk/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp?rev=180723&r1=180722&r2=180723&view=diff
==============================================================================
--- llvm/trunk/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp (original)
+++ llvm/trunk/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp Mon Apr 29 14:03:21 2013
@@ -154,7 +154,7 @@ ObjectImage *RuntimeDyldImpl::loadObject
isFirstRelocation = false;
}
- processRelocationRef(SectionID, i, *obj, LocalSections, LocalSymbols,
+ processRelocationRef(SectionID, *i, *obj, LocalSections, LocalSymbols,
Stubs);
}
}
Modified: llvm/trunk/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp?rev=180723&r1=180722&r2=180723&view=diff
==============================================================================
--- llvm/trunk/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp (original)
+++ llvm/trunk/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp Mon Apr 29 14:03:21 2013
@@ -600,17 +600,17 @@ void RuntimeDyldELF::resolveRelocation(c
}
void RuntimeDyldELF::processRelocationRef(unsigned SectionID,
- relocation_iterator RelI,
+ RelocationRef RelI,
ObjectImage &Obj,
ObjSectionToIDMap &ObjSectionToID,
const SymbolTableMap &Symbols,
StubMap &Stubs) {
uint64_t RelType;
- Check(RelI->getType(RelType));
+ Check(RelI.getType(RelType));
int64_t Addend;
- Check(RelI->getAdditionalInfo(Addend));
+ Check(RelI.getAdditionalInfo(Addend));
SymbolRef Symbol;
- Check(RelI->getSymbol(Symbol));
+ Check(RelI.getSymbol(Symbol));
// Obtain the symbol name which is referenced in the relocation
StringRef TargetName;
@@ -667,7 +667,7 @@ void RuntimeDyldELF::processRelocationRe
}
}
uint64_t Offset;
- Check(RelI->getOffset(Offset));
+ Check(RelI.getOffset(Offset));
DEBUG(dbgs() << "\t\tSectionID: " << SectionID
<< " Offset: " << Offset
Modified: llvm/trunk/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.h?rev=180723&r1=180722&r2=180723&view=diff
==============================================================================
--- llvm/trunk/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.h (original)
+++ llvm/trunk/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.h Mon Apr 29 14:03:21 2013
@@ -71,7 +71,7 @@ protected:
virtual void resolveRelocation(const RelocationEntry &RE, uint64_t Value);
virtual void processRelocationRef(unsigned SectionID,
- relocation_iterator RelI,
+ RelocationRef RelI,
ObjectImage &Obj,
ObjSectionToIDMap &ObjSectionToID,
const SymbolTableMap &Symbols,
Modified: llvm/trunk/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldImpl.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldImpl.h?rev=180723&r1=180722&r2=180723&view=diff
==============================================================================
--- llvm/trunk/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldImpl.h (original)
+++ llvm/trunk/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldImpl.h Mon Apr 29 14:03:21 2013
@@ -282,7 +282,7 @@ protected:
/// \brief Parses the object file relocation and stores it to Relocations
/// or SymbolRelocations (this depends on the object file type).
virtual void processRelocationRef(unsigned SectionID,
- relocation_iterator RelI,
+ RelocationRef RelI,
ObjectImage &Obj,
ObjSectionToIDMap &ObjSectionToID,
const SymbolTableMap &Symbols,
Modified: llvm/trunk/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp?rev=180723&r1=180722&r2=180723&view=diff
==============================================================================
--- llvm/trunk/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp (original)
+++ llvm/trunk/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp Mon Apr 29 14:03:21 2013
@@ -214,14 +214,14 @@ bool RuntimeDyldMachO::resolveARMRelocat
}
void RuntimeDyldMachO::processRelocationRef(unsigned SectionID,
- relocation_iterator RelI,
+ RelocationRef RelI,
ObjectImage &Obj,
ObjSectionToIDMap &ObjSectionToID,
const SymbolTableMap &Symbols,
StubMap &Stubs) {
const ObjectFile *OF = Obj.getObjectFile();
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);
RelocationValueRef Value;
@@ -233,7 +233,7 @@ void RuntimeDyldMachO::processRelocation
if (isExtern) {
// Obtain the symbol name which is referenced in the relocation
SymbolRef Symbol;
- RelI->getSymbol(Symbol);
+ RelI.getSymbol(Symbol);
StringRef TargetName;
Symbol.getName(TargetName);
// First search for the symbol in the local symbol table
@@ -277,7 +277,7 @@ void RuntimeDyldMachO::processRelocation
}
uint64_t Offset;
- RelI->getOffset(Offset);
+ RelI.getOffset(Offset);
if (Arch == Triple::arm && (RelType & 0xf) == macho::RIT_ARM_Branch24Bit) {
// This is an ARM branch relocation, need to use a stub function.
Modified: llvm/trunk/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.h?rev=180723&r1=180722&r2=180723&view=diff
==============================================================================
--- llvm/trunk/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.h (original)
+++ llvm/trunk/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.h Mon Apr 29 14:03:21 2013
@@ -49,7 +49,7 @@ protected:
int64_t Addend);
virtual void processRelocationRef(unsigned SectionID,
- relocation_iterator RelI,
+ RelocationRef RelI,
ObjectImage &Obj,
ObjSectionToIDMap &ObjSectionToID,
const SymbolTableMap &Symbols,
More information about the llvm-commits
mailing list