[Mips] Inline the configurePLTReference method

No functional changes.

llvm-svn: 222323
This commit is contained in:
Simon Atanasyan
2014-11-19 05:51:05 +00:00
parent 6a33f94dd1
commit a50af747eb

View File

@@ -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;
@@ -478,12 +477,6 @@ bool RelocationPass<ELFT>::requireCopy(Reference &ref) {
return sa && sa->type() == SharedLibraryAtom::Type::Data;
}
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);
@@ -512,7 +505,7 @@ void RelocationPass<ELFT>::handlePlain(Reference &ref) {
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 RelocationPass<ELFT>::handle26(Reference &ref) {
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) {