[PATCH] D130787: [lld][ELF] Rename SymbolTable::symbols() to SymbolTable::getSymbols(). NFC

Sam Clegg via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 29 10:31:43 PDT 2022


sbc100 created this revision.
Herald added subscribers: ormris, wingo, steven_wu, sunfish, hiraditya, arichardson, emaste.
Herald added a reviewer: MaskRay.
Herald added a project: All.
sbc100 requested review of this revision.
Herald added subscribers: llvm-commits, StephenFan, aheejin.
Herald added a project: LLVM.

This change renames this method match its original name and the name
used in the wasm linker.

Back in d8f8abbd4a2823f223bd7bc56445541fb221b512 the ELF SymbolTable
method `getSymbols()` was replaced with `forEachSymbol`.

Then in a2fc96441788fba1e4709d63677f34ed8e321dae <https://reviews.llvm.org/rGa2fc96441788fba1e4709d63677f34ed8e321dae> `forEachSymbol` was
replaced with a `llvm::iterator_range`.

Then in e9262edf0d11a907763098d8e101219ccd9c43e9 <https://reviews.llvm.org/rGe9262edf0d11a907763098d8e101219ccd9c43e9> we came full circle
and the `llvm::iterator_range` was replaced with a `symbols()` accessor
that was identical the original `getSymbols()`.

`getSymbols` also matches the name used elsewhere in the ELF linker as
well as in both COFF and wasm backend (e.g. `InputFiles.h` and
`SyntheticSections.h`)


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D130787

Files:
  lld/ELF/Driver.cpp
  lld/ELF/ICF.cpp
  lld/ELF/LTO.cpp
  lld/ELF/MarkLive.cpp
  lld/ELF/Relocations.cpp
  lld/ELF/SymbolTable.h
  lld/ELF/Writer.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D130787.448676.patch
Type: text/x-patch
Size: 6233 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220729/f397d8f6/attachment.bin>


More information about the llvm-commits mailing list