diff options
author | Rui Ueyama <ruiu@google.com> | 2017-11-03 21:21:47 +0000 |
---|---|---|
committer | Rui Ueyama <ruiu@google.com> | 2017-11-03 21:21:47 +0000 |
commit | f52496e1e012c2448f1c021d41664fa70315cb90 (patch) | |
tree | 2822982069fff9e5c09f6df88079afadbd2bc980 /lld/COFF/Symbols.cpp | |
parent | e6b53dad4239ff9f651e46fa6cbfba48a299cf9b (diff) | |
download | bcm5719-llvm-f52496e1e012c2448f1c021d41664fa70315cb90.tar.gz bcm5719-llvm-f52496e1e012c2448f1c021d41664fa70315cb90.zip |
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/COFF/Symbols.cpp')
-rw-r--r-- | lld/COFF/Symbols.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lld/COFF/Symbols.cpp b/lld/COFF/Symbols.cpp index e08edc50a1b..f15607b8402 100644 --- a/lld/COFF/Symbols.cpp +++ b/lld/COFF/Symbols.cpp @@ -20,7 +20,7 @@ using namespace llvm; using namespace llvm::object; // Returns a symbol name for an error message. -std::string lld::toString(coff::SymbolBody &B) { +std::string lld::toString(coff::Symbol &B) { if (Optional<std::string> S = coff::demangle(B.getName())) return ("\"" + *S + "\" (" + B.getName() + ")").str(); return B.getName(); @@ -29,7 +29,7 @@ std::string lld::toString(coff::SymbolBody &B) { namespace lld { namespace coff { -StringRef SymbolBody::getName() { +StringRef Symbol::getName() { // COFF symbol names are read lazily for a performance reason. // Non-external symbol names are never used by the linker except for logging // or debugging. Their internal references are resolved not by name but by @@ -44,7 +44,7 @@ StringRef SymbolBody::getName() { return Name; } -InputFile *SymbolBody::getFile() { +InputFile *Symbol::getFile() { if (auto *Sym = dyn_cast<DefinedCOFF>(this)) return Sym->File; if (auto *Sym = dyn_cast<Lazy>(this)) @@ -52,7 +52,7 @@ InputFile *SymbolBody::getFile() { return nullptr; } -bool SymbolBody::isLive() const { +bool Symbol::isLive() const { if (auto *R = dyn_cast<DefinedRegular>(this)) return R->getChunk()->isLive(); if (auto *Imp = dyn_cast<DefinedImportData>(this)) @@ -91,7 +91,7 @@ DefinedImportThunk::DefinedImportThunk(StringRef Name, DefinedImportData *S, Defined *Undefined::getWeakAlias() { // A weak alias may be a weak alias to another symbol, so check recursively. - for (SymbolBody *A = WeakAlias; A; A = cast<Undefined>(A)->WeakAlias) + for (Symbol *A = WeakAlias; A; A = cast<Undefined>(A)->WeakAlias) if (auto *D = dyn_cast<Defined>(A)) return D; return nullptr; |