PiotrZSL added a comment. A litte overkill, there is llvm/include/llvm/Support/GlobPattern.h that could be used to simplify this code. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129706/new/ https://reviews.llvm.org/D129706