[PATCH] D150990: [split-file] Add flags to support comments and adding extension to output files
Aaron Ballman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed May 24 08:47:47 PDT 2023
aaron.ballman added a comment.
In D150990#4365708 <https://reviews.llvm.org/D150990#4365708>, @MaskRay wrote:
>> `// dr164: 16 becomes //--- dr164: 16, which produces dr164.cpp file with the corresponding test.`
>
> I am confused by this comment. Does the option ignore everything starting from the `:`? Why?
The current DR script works by looking for magic comments of the form `// drNNNN: MM` where NNNN is the DR # and MM is the version of Clang it's implemented in (or specifies it's not implemented, is partial, etc; there are non-numeric values for that). The idea behind this patch is to allow this to work with split-file commands so that we can have one test file with hundreds of DRs tested in it, but we can hermetically test some of those DRs to avoid interactions between tests (which happens today unfortunately). In order to support that need, we need some way to specify a file extension (otherwise the file ends up with no extension and we need to add `-x c++` to the RUN lines which is unnatural and distracting) and we need some way to tell split-file that the splitting happens at a slightly differently than normal so that `--- dr123: 16` doesn't try to generate a file named `dr123: 16`. `--add-file-extension` serves the first purpose and `--allow-comments` serves the second.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D150990/new/
https://reviews.llvm.org/D150990
More information about the llvm-commits
mailing list