HomePhabricator

[support] GlobPattern: add support for `\` and `[!...]`, and allow `]` in more…

Description

[support] GlobPattern: add support for \ and [!...], and allow ] in more places

Summary: Update GlobPattern in libSupport to handle a few more cases. It does not fully match the fnmatch used by GNU objcopy since named character classes (e.g. [[:digit:]]) are not supported, but this should support most existing use cases (mostly just * is what's used anyway).

This will be used to implement the --wildcard flag in llvm-objcopy to be more compatible with GNU objcopy.

This is split off of D66613 to land the libSupport changes separately. The llvm-objcopy part will land soon.

Reviewers: jhenderson, MaskRay, evgeny777, espindola, alexshap

Reviewed By: MaskRay

Subscribers: nickdesaulniers, emaste, arichardson, hiraditya, jakehehrlich, abrachet, seiya, llvm-commits

Tags: #llvm

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

undo objcopy changes to make this libsupport only

Details

Committed
rupprechtOct 16 2019, 3:31 PM
Reviewer
MaskRay
Differential Revision
D66613: [support][llvm-objcopy] Add support for shell wildcards
Parents
rL375050: [Utils] Cleanup similar cases to MergeBlockIntoPredecessor.
Branches
Unknown
Tags
Unknown