[PATCH] D39418: [ELF] - Split processSectionCommands().

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 30 06:57:47 PDT 2017


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

It was suggested in https://reviews.llvm.org/D38582 thread and I think reasonable
cleanup itself.

`processSectionCommands()` uses `createInputSectionList()` to construct the
list of input sections. In this patch I changed `createInputSectionList()` to return
Optional<>, so that now it filters out sections that does not satisfy ONLY_IF_RO/ONLY_IF_RW
constraints and sections that are discarded using /DISCARD/ on its side. That allows
to reduce loop in `processSectionCommands()` and I think looks more natural.


https://reviews.llvm.org/D39418

Files:
  ELF/LinkerScript.cpp
  ELF/LinkerScript.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D39418.120812.patch
Type: text/x-patch
Size: 4071 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171030/036286e3/attachment.bin>


More information about the llvm-commits mailing list