[PATCH] D35936: [ELF] - Move getSymbols() method to InputFile.

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 27 04:36:55 PDT 2017


grimar created this revision.
Herald added a subscriber: emaste.

I suggest to do this change, together with another change which
I'll post in a few minutes that allows to detemplate code like:

  for (elf::ObjectFile<ELFT> *File : Symtab<ELFT>::X->getObjectFiles()) {
    for (SymbolBody *Body : File->getSymbols()) {
      auto *D = dyn_cast<DefinedRegular>(Body);
      if (!D || !D->Section)
        continue;

Going to use it in https://reviews.llvm.org/D35843, which need iterating over DefinedRegular symbols
from non-ELFT-templated code.


https://reviews.llvm.org/D35936

Files:
  ELF/InputFiles.cpp
  ELF/InputFiles.h
  ELF/InputSection.cpp
  ELF/LinkerScript.cpp
  ELF/MapFile.cpp
  ELF/Writer.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D35936.108447.patch
Type: text/x-patch
Size: 5316 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170727/bfb724ba/attachment.bin>


More information about the llvm-commits mailing list