[PATCH] D35987: [ELF] - Introduce `std::vector<InputFile *> InputFiles` global array.

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 28 03:52:55 PDT 2017


grimar created this revision.
Herald added subscribers: sdardis, emaste.

This patch removes lot of static Instances arrays from different input file 
classes and introduces global array for access instead. Similar to arrays we
have for InputSections/OutputSectionCommands.

It allows to iterate over input files in a non-templated code,
leaving ability to get required list of files from templated code
easily with use of introduces getInputFiles<T>() method.

Intented to be used together with 
https://reviews.llvm.org/D35936 ("[ELF] - Move getSymbols() method to InputFile")
in https://reviews.llvm.org/D35843 ("[ELF] - Fix "--symbol-ordering-file doesn't work with linker scripts") patch, 
more details is in description for https://reviews.llvm.org/D35936 patch.


https://reviews.llvm.org/D35987

Files:
  ELF/Arch/MipsArchTree.cpp
  ELF/Driver.cpp
  ELF/InputFiles.cpp
  ELF/InputFiles.h
  ELF/MapFile.cpp
  ELF/SymbolTable.cpp
  ELF/SyntheticSections.cpp
  ELF/Writer.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D35987.108623.patch
Type: text/x-patch
Size: 9559 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170728/a3887d16/attachment.bin>


More information about the llvm-commits mailing list