[lld] r222323 - [Mips] Inline the configurePLTReference method

Simon Atanasyan simon at atanasyan.com
Tue Nov 18 21:51:05 PST 2014


Author: atanasyan
Date: Tue Nov 18 23:51:05 2014
New Revision: 222323

URL: http://llvm.org/viewvc/llvm-project?rev=222323&view=rev
Log:
[Mips] Inline the configurePLTReference method

No functional changes.

Modified:
    lld/trunk/lib/ReaderWriter/ELF/Mips/MipsRelocationPass.cpp

Modified: lld/trunk/lib/ReaderWriter/ELF/Mips/MipsRelocationPass.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/Mips/MipsRelocationPass.cpp?rev=222323&r1=222322&r2=222323&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/ELF/Mips/MipsRelocationPass.cpp (original)
+++ lld/trunk/lib/ReaderWriter/ELF/Mips/MipsRelocationPass.cpp Tue Nov 18 23:51:05 2014
@@ -248,7 +248,6 @@ private:
   bool requireLA25Stub(const Atom *a) const;
   bool requirePLTEntry(Reference &ref);
   bool requireCopy(Reference &ref);
-  void configurePLTReference(Reference &ref);
   void createPLTHeader();
   bool mightBeDynamic(const MipsELFDefinedAtom<ELFT> &atom,
                       const Reference &ref) const;
@@ -479,12 +478,6 @@ bool RelocationPass<ELFT>::requireCopy(R
 }
 
 template <typename ELFT>
-void RelocationPass<ELFT>::configurePLTReference(Reference &ref) {
-  auto *plt = getPLTEntry(ref.target());
-  ref.setTarget(plt);
-}
-
-template <typename ELFT>
 bool RelocationPass<ELFT>::isDynamic(const Atom *atom) const {
   const auto *da = dyn_cast<const DefinedAtom>(atom);
   if (da && da->dynamicExport() == DefinedAtom::dynamicExportAlways)
@@ -512,7 +505,7 @@ void RelocationPass<ELFT>::handlePlain(R
       return;
 
   if (requirePLTEntry(ref))
-    configurePLTReference(ref);
+    ref.setTarget(getPLTEntry(ref.target()));
   else if (requireCopy(ref))
     ref.setTarget(getObjectEntry(cast<SharedLibraryAtom>(ref.target())));
 }
@@ -527,7 +520,7 @@ template <typename ELFT> void Relocation
 
   const auto *sla = dyn_cast<SharedLibraryAtom>(ref.target());
   if (sla && sla->type() == SharedLibraryAtom::Type::Code)
-    configurePLTReference(ref);
+    ref.setTarget(getPLTEntry(ref.target()));
 }
 
 template <typename ELFT> void RelocationPass<ELFT>::handleGOT(Reference &ref) {





More information about the llvm-commits mailing list