summaryrefslogtreecommitdiff
path: root/lld/ELF/InputFiles.cpp
diff options
context:
space:
mode:
authorRui Ueyama <ruiu@google.com>2017-11-03 21:21:47 +0000
committerRui Ueyama <ruiu@google.com>2017-11-03 21:21:47 +0000
commitf52496e1e012c2448f1c021d41664fa70315cb90 (patch)
tree2822982069fff9e5c09f6df88079afadbd2bc980 /lld/ELF/InputFiles.cpp
parente6b53dad4239ff9f651e46fa6cbfba48a299cf9b (diff)
Rename SymbolBody -> Symbol
Now that we have only SymbolBody as the symbol class. So, "SymbolBody" is a bit strange name now. This is a mechanical change generated by perl -i -pe s/SymbolBody/Symbol/g $(git grep -l SymbolBody lld/ELF lld/COFF) nd clang-format-diff. Differential Revision: https://reviews.llvm.org/D39459 llvm-svn: 317370
Diffstat (limited to 'lld/ELF/InputFiles.cpp')
-rw-r--r--lld/ELF/InputFiles.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/lld/ELF/InputFiles.cpp b/lld/ELF/InputFiles.cpp
index 1210666e42c3..c2f5bb496a58 100644
--- a/lld/ELF/InputFiles.cpp
+++ b/lld/ELF/InputFiles.cpp
@@ -227,7 +227,7 @@ ObjFile<ELFT>::ObjFile(MemoryBufferRef M, StringRef ArchiveName)
this->ArchiveName = ArchiveName;
}
-template <class ELFT> ArrayRef<SymbolBody *> ObjFile<ELFT>::getLocalSymbols() {
+template <class ELFT> ArrayRef<Symbol *> ObjFile<ELFT>::getLocalSymbols() {
if (this->Symbols.empty())
return {};
return makeArrayRef(this->Symbols).slice(1, this->FirstNonLocal - 1);
@@ -569,7 +569,7 @@ StringRef ObjFile<ELFT>::getSectionName(const Elf_Shdr &Sec) {
template <class ELFT> void ObjFile<ELFT>::initializeSymbols() {
this->Symbols.reserve(this->ELFSyms.size());
for (const Elf_Sym &Sym : this->ELFSyms)
- this->Symbols.push_back(createSymbolBody(&Sym));
+ this->Symbols.push_back(createSymbol(&Sym));
}
template <class ELFT>
@@ -584,8 +584,7 @@ InputSectionBase *ObjFile<ELFT>::getSection(uint32_t Index) const {
return nullptr;
}
-template <class ELFT>
-SymbolBody *ObjFile<ELFT>::createSymbolBody(const Elf_Sym *Sym) {
+template <class ELFT> Symbol *ObjFile<ELFT>::createSymbol(const Elf_Sym *Sym) {
int Binding = Sym->getBinding();
InputSectionBase *Sec = getSection(this->getSectionIndex(*Sym));
@@ -905,9 +904,9 @@ static uint8_t mapVisibility(GlobalValue::VisibilityTypes GvVisibility) {
}
template <class ELFT>
-static SymbolBody *createBitcodeSymbol(const std::vector<bool> &KeptComdats,
- const lto::InputFile::Symbol &ObjSym,
- BitcodeFile *F) {
+static Symbol *createBitcodeSymbol(const std::vector<bool> &KeptComdats,
+ const lto::InputFile::Symbol &ObjSym,
+ BitcodeFile *F) {
StringRef NameRef = Saver.save(ObjSym.getName());
uint32_t Binding = ObjSym.isWeak() ? STB_WEAK : STB_GLOBAL;