[Mips] Inline the MipsELFWriter::hasGlobalGOTEntry function

No functional changes.

llvm-svn: 233924
This commit is contained in:
Simon Atanasyan 2015-04-02 16:44:26 +00:00
parent 8adeef9632
commit 8189ee9a1e
2 changed files with 2 additions and 6 deletions

View File

@ -47,10 +47,6 @@ public:
setAtomValue("__gnu_local_gp", gp);
}
bool hasGlobalGOTEntry(const Atom *a) const {
return _targetLayout.getGOTSection().hasGlobalGOTEntry(a);
}
std::unique_ptr<RuntimeFile<ELFT>> createRuntimeFile() {
auto file = llvm::make_unique<RuntimeFile<ELFT>>(_ctx, "Mips runtime file");
if (_ctx.isDynamic()) {

View File

@ -74,7 +74,7 @@ void MipsExecutableWriter<ELFT>::buildDynamicSymbolTable(const File &file) {
for (auto sec : this->_layout.sections())
if (auto section = dyn_cast<AtomSection<ELFT>>(sec))
for (const auto &atom : section->atoms()) {
if (_writeHelper.hasGlobalGOTEntry(atom->_atom)) {
if (_targetLayout.getGOTSection().hasGlobalGOTEntry(atom->_atom)) {
this->_dynamicSymbolTable->addSymbol(atom->_atom, section->ordinal(),
atom->_virtualAddr, atom);
continue;
@ -98,7 +98,7 @@ void MipsExecutableWriter<ELFT>::buildDynamicSymbolTable(const File &file) {
// FIXME (simon): Consider to move this check to the
// MipsELFUndefinedAtom class method. That allows to
// handle more complex coditions in the future.
if (_writeHelper.hasGlobalGOTEntry(a))
if (_targetLayout.getGOTSection().hasGlobalGOTEntry(a))
this->_dynamicSymbolTable->addSymbol(a, ELF::SHN_UNDEF);
// Skip our immediate parent class method