summaryrefslogtreecommitdiffstats
path: root/lld/ELF/InputFiles.cpp
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2016-11-03 14:17:53 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2016-11-03 14:17:53 +0000
commitcc728b41b69cb12f27e7616e5d04e2a9c8993e93 (patch)
tree68b86bb63e3ca09df92bfabe30a308e3523a5cae /lld/ELF/InputFiles.cpp
parente7d97368f2d862bc6b4d792ebafaaf19103ae403 (diff)
downloadbcm5719-llvm-cc728b41b69cb12f27e7616e5d04e2a9c8993e93.tar.gz
bcm5719-llvm-cc728b41b69cb12f27e7616e5d04e2a9c8993e93.zip
Use existing ELFObj function. NFC.
llvm-svn: 285913
Diffstat (limited to 'lld/ELF/InputFiles.cpp')
-rw-r--r--lld/ELF/InputFiles.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/lld/ELF/InputFiles.cpp b/lld/ELF/InputFiles.cpp
index 8e626720376..7995d58fa17 100644
--- a/lld/ELF/InputFiles.cpp
+++ b/lld/ELF/InputFiles.cpp
@@ -564,10 +564,7 @@ SharedFile<ELFT>::SharedFile(MemoryBufferRef M)
template <class ELFT>
const typename ELFT::Shdr *
SharedFile<ELFT>::getSection(const Elf_Sym &Sym) const {
- uint32_t Index = this->getSectionIndex(Sym);
- if (Index == 0)
- return nullptr;
- return check(this->ELFObj.getSection(Index));
+ return check(this->ELFObj.getSection(&Sym, this->Symtab, this->SymtabSHNDX));
}
// Partially parse the shared object file so that we can call
OpenPOWER on IntegriCloud