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
diff --git a/lld/ELF/LTO.cpp b/lld/ELF/LTO.cpp
index d0da8c8..29598ca 100644
--- a/lld/ELF/LTO.cpp
+++ b/lld/ELF/LTO.cpp
@@ -108,7 +108,7 @@
}
BitcodeCompiler::BitcodeCompiler() : LTOObj(createLTO()) {
- for (SymbolBody *Sym : Symtab->getSymbols()) {
+ for (Symbol *Sym : Symtab->getSymbols()) {
StringRef Name = Sym->getName();
for (StringRef Prefix : {"__start_", "__stop_"})
if (Name.startswith(Prefix))
@@ -118,7 +118,7 @@
BitcodeCompiler::~BitcodeCompiler() = default;
-static void undefine(SymbolBody *S) {
+static void undefine(Symbol *S) {
replaceBody<Undefined>(S, nullptr, S->getName(), /*IsLocal=*/false,
STV_DEFAULT, S->Type);
}
@@ -126,7 +126,7 @@
void BitcodeCompiler::add(BitcodeFile &F) {
lto::InputFile &Obj = *F.Obj;
unsigned SymNum = 0;
- std::vector<SymbolBody *> Syms = F.getSymbols();
+ std::vector<Symbol *> Syms = F.getSymbols();
std::vector<lto::SymbolResolution> Resols(Syms.size());
DenseSet<StringRef> ScriptSymbols;
@@ -136,7 +136,7 @@
// Provide a resolution to the LTO API for each symbol.
for (const lto::InputFile::Symbol &ObjSym : Obj.symbols()) {
- SymbolBody *Sym = Syms[SymNum];
+ Symbol *Sym = Syms[SymNum];
lto::SymbolResolution &R = Resols[SymNum];
++SymNum;