diff options
author | Ellis Hoag <ellis.sparky.hoag@gmail.com> | 2023-09-01 08:48:07 -0700 |
---|---|---|
committer | Ellis Hoag <ellis.sparky.hoag@gmail.com> | 2023-09-01 09:06:11 -0700 |
commit | 8eb34700c2b1847ec6dfb8f92b305b65278d2ec0 (patch) | |
tree | af2c5ade0a9d00a965e46d79c9184a88f121f9da /llvm/tools/llvm-objdump/llvm-objdump.cpp | |
parent | b6310e65f61c07e90fdbdc7f7158065fb0c94656 (diff) | |
download | llvm-8eb34700c2b1847ec6dfb8f92b305b65278d2ec0.zip llvm-8eb34700c2b1847ec6dfb8f92b305b65278d2ec0.tar.gz llvm-8eb34700c2b1847ec6dfb8f92b305b65278d2ec0.tar.bz2 |
[SpecialCaseList] Add option to use Globs instead of Regex to match patterns
Add an option in `SpecialCaseList` to use Globs instead of Regex to match patterns. `GlobPattern` was extended in https://reviews.llvm.org/D153587 to support brace expansions which allows us to use patterns like `*/src/foo.{c,cpp}`. It turns out that most patterns only take advantage of `*` so using Regex was overkill and required lots of escaping in practice. This often led to bugs due to forgetting to escape special characters.
Since this would be a breaking change, we temporarily support Regex by default and use Globs when `#!special-case-list-v2` is the first line in the file. Users should switch to the glob format described in https://llvm.org/doxygen/classllvm_1_1GlobPattern.html. For example, `(abc|def)` should become `{abc,def}`.
See discussion in https://reviews.llvm.org/D152762 and https://discourse.llvm.org/t/use-glob-instead-of-regex-for-specialcaselists/71666.
Reviewed By: MaskRay
Differential Revision: https://reviews.llvm.org/D154014
Diffstat (limited to 'llvm/tools/llvm-objdump/llvm-objdump.cpp')
0 files changed, 0 insertions, 0 deletions