From a50af747eb1240a4f13ca53885b5b47a8fa0466e Mon Sep 17 00:00:00 2001 From: Simon Atanasyan Date: Wed, 19 Nov 2014 05:51:05 +0000 Subject: [PATCH] [Mips] Inline the configurePLTReference method No functional changes. llvm-svn: 222323 --- lld/lib/ReaderWriter/ELF/Mips/MipsRelocationPass.cpp | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/lld/lib/ReaderWriter/ELF/Mips/MipsRelocationPass.cpp b/lld/lib/ReaderWriter/ELF/Mips/MipsRelocationPass.cpp index 8b4bb7299f1f..c94aa269e4ea 100644 --- a/lld/lib/ReaderWriter/ELF/Mips/MipsRelocationPass.cpp +++ b/lld/lib/ReaderWriter/ELF/Mips/MipsRelocationPass.cpp @@ -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 &atom, const Reference &ref) const; @@ -478,12 +477,6 @@ bool RelocationPass::requireCopy(Reference &ref) { return sa && sa->type() == SharedLibraryAtom::Type::Data; } -template -void RelocationPass::configurePLTReference(Reference &ref) { - auto *plt = getPLTEntry(ref.target()); - ref.setTarget(plt); -} - template bool RelocationPass::isDynamic(const Atom *atom) const { const auto *da = dyn_cast(atom); @@ -512,7 +505,7 @@ void RelocationPass::handlePlain(Reference &ref) { return; if (requirePLTEntry(ref)) - configurePLTReference(ref); + ref.setTarget(getPLTEntry(ref.target())); else if (requireCopy(ref)) ref.setTarget(getObjectEntry(cast(ref.target()))); } @@ -527,7 +520,7 @@ template void RelocationPass::handle26(Reference &ref) { const auto *sla = dyn_cast(ref.target()); if (sla && sla->type() == SharedLibraryAtom::Type::Code) - configurePLTReference(ref); + ref.setTarget(getPLTEntry(ref.target())); } template void RelocationPass::handleGOT(Reference &ref) {