[PATCH] D66432: [llvm-objcopy][NFC] Refactor symbol/section matching

Jordan Rupprecht via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 19 11:06:34 PDT 2019


rupprecht created this revision.
rupprecht added reviewers: jhenderson, seiya, MaskRay.
Herald added subscribers: llvm-commits, abrachet, jakehehrlich, arichardson, emaste.
Herald added a reviewer: espindola.
Herald added a reviewer: alexshap.
Herald added a project: LLVM.

The matchers for section/symbol related flags (e.g. `--keep-symbol=Name` or `--regex --keep-symbol=foo.*`) are currently just vectors that are matched linearlly. However, adding wildcard support would require negative matching too, e.g. a symbol should be removed if it matches a wildcard *but* doesn't match some other wildcard.

To make the next patch simpler, consolidate matching logic to a class defined in CopyConfig that takes care of matching.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D66432

Files:
  llvm/tools/llvm-objcopy/COFF/COFFObjcopy.cpp
  llvm/tools/llvm-objcopy/CopyConfig.cpp
  llvm/tools/llvm-objcopy/CopyConfig.h
  llvm/tools/llvm-objcopy/ELF/ELFObjcopy.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D66432.215952.patch
Type: text/x-patch
Size: 12367 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190819/b799d4e7/attachment.bin>


More information about the llvm-commits mailing list