[PATCH] D150856: [lit] Add %{for-each-file} substitution

Vlad Serebrennikov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 4 23:05:16 PDT 2023


Endill added a comment.

Thank you for taking a look at this thread!

In D150856#4472330 <https://reviews.llvm.org/D150856#4472330>, @ldionne wrote:

> In D150856#4421565 <https://reviews.llvm.org/D150856#4421565>, @aaron.ballman wrote:
>
>> The reason I favor the current `%{for-each-file}` approach is that it works well for more complex scenarios and it's extensible.
>
> I actually had the exact opposite reaction: I was not able to see how this would compose. For example, can you nest a command that uses `%{for-each-file}` within a command that uses `%{for-each-file}`?

If I understand it correctly, your scenario should result into Cartesian product of two %{for-each-file}. In this patch I left a placeholder for that part of implementation.
But there's no point discussing that idea anymore, I believe. We converged on having PYTHON directive and lit exposing a Python API for applying substitutions and adding directives.

Thank you for sharing your experience with libc++ test suite! It is possible to apply your approach for DR tests, but I'm not keen to add a new layer of abstraction for tests that need to generate just RUN directives, keeping test cases the same.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D150856/new/

https://reviews.llvm.org/D150856



More information about the llvm-commits mailing list