[llvm-branch-commits] [NFC][SpecialCaseList] Convert `preprocess` into `LazyInit` (PR #167281)

Vitaly Buka via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Sun Nov 9 23:20:21 PST 2025


https://github.com/vitalybuka created https://github.com/llvm/llvm-project/pull/167281

Currently SpecialCaseList created at least twice,
one on by `Driver`, for diagnostics only, and then
the real one by the `ASTContext`.

Also, deppending on enabled sanitizers, not all
sections will be used.

In both cases there is unnecessary RadixTree
construction.

This patch changes `GlobMatcher` to do initialization
lazily only when needed.

And remove empty one from `RegexMatcher`.

This saves saves 0.5% of clang time building large project.





More information about the llvm-branch-commits mailing list