diff options
author | Rui Ueyama <ruiu@google.com> | 2017-10-31 16:07:41 +0000 |
---|---|---|
committer | Rui Ueyama <ruiu@google.com> | 2017-10-31 16:07:41 +0000 |
commit | 74a7720a23d8e63dfa11b5196453ba6ae428e526 (patch) | |
tree | 872cd90e1a859e7f3eadda0f130376ed03054014 /lld/ELF/MarkLive.cpp | |
parent | 29096e290a4bc3b7d1bc6fe0c71de8ddb14106df (diff) |
Merge SymbolBody and Symbol into one class, SymbolBody.
SymbolBody and Symbol were separated classes due to a historical reason.
Symbol used to be a pointer to a SymbolBody, and the relationship
between Symbol and SymbolBody was n:1.
r2681780 changed that. Since that patch, SymbolBody and Symbol are
allocated next to each other to improve memory locality, and they have
1:1 relationship now. So, the separation of Symbol and SymbolBody no
longer makes sense.
This patch merges them into one class. In order to avoid updating too
many places, I chose SymbolBody as a unified name. I'll rename it Symbol
in a follow-up patch.
Differential Revision: https://reviews.llvm.org/D39406
Diffstat (limited to 'lld/ELF/MarkLive.cpp')
-rw-r--r-- | lld/ELF/MarkLive.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lld/ELF/MarkLive.cpp b/lld/ELF/MarkLive.cpp index b585f7edb17..adc4c55d4c1 100644 --- a/lld/ELF/MarkLive.cpp +++ b/lld/ELF/MarkLive.cpp @@ -228,9 +228,9 @@ template <class ELFT> static void doGcSections() { // Preserve externally-visible symbols if the symbols defined by this // file can interrupt other ELF file's symbols at runtime. - for (Symbol *S : Symtab->getSymbols()) + for (SymbolBody *S : Symtab->getSymbols()) if (S->includeInDynsym()) - MarkSymbol(S->body()); + MarkSymbol(S); // Preserve special sections and those which are specified in linker // script KEEP command. |