HomePhabricator

[llvm-objcopy][NFC] Refactor symbol/section matching

Authored by rupprecht on Aug 22 2019, 12:17 PM.

Description

[llvm-objcopy][NFC] Refactor symbol/section matching

Summary:
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.

Reviewers: jhenderson, seiya, MaskRay, espindola, alexshap

Reviewed By: jhenderson, MaskRay

Subscribers: emaste, arichardson, jakehehrlich, abrachet, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D66432

llvm-svn: 369689

Details

Committed
rupprechtAug 22 2019, 12:17 PM
Reviewer
jhenderson
Differential Revision
D66432: [llvm-objcopy][NFC] Refactor symbol/section matching
Parents
rG7a490c5b0683: Disable the ScanDepsReuseFilemanager test on Windows
Branches
Unknown
Tags
Unknown