diff options
| author | Rui Ueyama <ruiu@google.com> | 2016-01-06 01:56:36 +0000 |
|---|---|---|
| committer | Rui Ueyama <ruiu@google.com> | 2016-01-06 01:56:36 +0000 |
| commit | 7c713319b9ea2273ce06eb9599981707a9fdaffb (patch) | |
| tree | 07f44a58a378a61a2cfa46176b54f5f52ee3e12c /lld/ELF/InputFiles.cpp | |
| parent | a2ef81fde5ef18d076ab7a997b370984ab9c170f (diff) | |
| download | bcm5719-llvm-7c713319b9ea2273ce06eb9599981707a9fdaffb.tar.gz bcm5719-llvm-7c713319b9ea2273ce06eb9599981707a9fdaffb.zip | |
Rename SharedFile::parse -> SharedFile::parseRest.
Unlike ObjectFile or ArchiveFile, SharedFile had two parse functions,
parseSoName() and parse(). parse must have been called after parseSoName,
but that requirement was not obvious from their names. (So it looked
like you could call parse() on a shared object file right away.)
This patch rename parseRest. It is now obvious that there's no single
parse function for the shared object file.
llvm-svn: 256898
Diffstat (limited to 'lld/ELF/InputFiles.cpp')
| -rw-r--r-- | lld/ELF/InputFiles.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lld/ELF/InputFiles.cpp b/lld/ELF/InputFiles.cpp index 1369446d0dd..a0285b05976 100644 --- a/lld/ELF/InputFiles.cpp +++ b/lld/ELF/InputFiles.cpp @@ -354,6 +354,8 @@ SharedFile<ELFT>::getSection(const Elf_Sym &Sym) const { return *Ret; } +// Partially parse the shared object file so that we can call +// getSoName on this object. template <class ELFT> void SharedFile<ELFT>::parseSoName() { typedef typename ELFFile<ELFT>::Elf_Dyn Elf_Dyn; typedef typename ELFFile<ELFT>::uintX_t uintX_t; @@ -399,7 +401,8 @@ template <class ELFT> void SharedFile<ELFT>::parseSoName() { } } -template <class ELFT> void SharedFile<ELFT>::parse() { +// Fully parse the shared object file. This must be called after parseSoName(). +template <class ELFT> void SharedFile<ELFT>::parseRest() { Elf_Sym_Range Syms = this->getNonLocalSymbols(); uint32_t NumSymbols = std::distance(Syms.begin(), Syms.end()); SymbolBodies.reserve(NumSymbols); |

