Use a RelocationRef instead of a relocation_iterator.
authorRafael Espindola <rafael.espindola@gmail.com>
Mon, 29 Apr 2013 19:03:21 +0000 (19:03 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Mon, 29 Apr 2013 19:03:21 +0000 (19:03 +0000)
No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180723 91177308-0d34-0410-b5e6-96231b3b80d8

lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp
lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.h
lib/ExecutionEngine/RuntimeDyld/RuntimeDyldImpl.h
lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp
lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.h

index d843e9a7430128e418ec00ea1892163803650371..354795dc5f856e198a6daa1f842e4b74d3cd411b 100644 (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);
     }
   }
index d52bcadd2088fda843ee1a02a28591ed921b5454..ef4a4050e9efb90ea435d66ae9d7c07e20aa2b3e 100644 (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,
                                           ObjSectionToIDMap &ObjSectionToID,
                                           const SymbolTableMap &Symbols,
                                           StubMap &Stubs) {
   uint64_t RelType;
                                           ObjectImage &Obj,
                                           ObjSectionToIDMap &ObjSectionToID,
                                           const SymbolTableMap &Symbols,
                                           StubMap &Stubs) {
   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
   StringRef TargetName;
 
   // Obtain the symbol name which is referenced in the relocation
   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
                << " Offset: " << Offset
 
   DEBUG(dbgs() << "\t\tSectionID: " << SectionID
                << " Offset: " << Offset
index 835b66fb516108e196c222435a2550c769afba5f..2c04198ac01045c61627b91c2c940835142d3964 100644 (file)
@@ -71,7 +71,7 @@ protected:
   virtual void resolveRelocation(const RelocationEntry &RE, uint64_t Value);
 
   virtual void processRelocationRef(unsigned SectionID,
   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,
                                     ObjectImage &Obj,
                                     ObjSectionToIDMap &ObjSectionToID,
                                     const SymbolTableMap &Symbols,
index d0022c196d65febe7c66c9cb9aaadf6503371318..a02b19ca344d1ab3fdb0e9d374a1be2304ae31ba 100644 (file)
@@ -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,
   /// \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,
                                     ObjectImage &Obj,
                                     ObjSectionToIDMap &ObjSectionToID,
                                     const SymbolTableMap &Symbols,
index 9a6048c410cce990583a30790696f9d1e53e4e77..ddac59fd36482174034b4a13d09a82ab537474fb 100644 (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,
                                             ObjSectionToIDMap &ObjSectionToID,
                                             const SymbolTableMap &Symbols,
                                             StubMap &Stubs) {
   const ObjectFile *OF = Obj.getObjectFile();
   const MachOObjectFile *MachO = static_cast<const MachOObjectFile*>(OF);
                                             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;
 
   uint32_t RelType = MachO->getAnyRelocationType(RE);
   RelocationValueRef Value;
@@ -233,7 +233,7 @@ void RuntimeDyldMachO::processRelocationRef(unsigned SectionID,
   if (isExtern) {
     // Obtain the symbol name which is referenced in the relocation
     SymbolRef Symbol;
   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
     StringRef TargetName;
     Symbol.getName(TargetName);
     // 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) {
     // This is an ARM branch relocation, need to use a stub function.
 
   if (Arch == Triple::arm && (RelType & 0xf) == macho::RIT_ARM_Branch24Bit) {
     // This is an ARM branch relocation, need to use a stub function.
 
index c82b2f93ced846ef8fa10d6c232a1c177c3c1085..0fbfe038c88ccbf6fc8b10157413cfacd989cb8e 100644 (file)
@@ -49,7 +49,7 @@ protected:
                             int64_t Addend);
 
   virtual void processRelocationRef(unsigned SectionID,
                             int64_t Addend);
 
   virtual void processRelocationRef(unsigned SectionID,
-                                    relocation_iterator RelI,
+                                    RelocationRef RelI,
                                     ObjectImage &Obj,
                                     ObjSectionToIDMap &ObjSectionToID,
                                     const SymbolTableMap &Symbols,
                                     ObjectImage &Obj,
                                     ObjSectionToIDMap &ObjSectionToID,
                                     const SymbolTableMap &Symbols,