[libcxx-commits] [PATCH] D154987: [lit] Implement PYTHON directive and config.prologue

Vlad Serebrennikov via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Mon Jul 17 19:51:13 PDT 2023


Endill added inline comments.


================
Comment at: llvm/utils/lit/lit/TestRunner.py:2243-2244
+
+        # TODO: In the future, extend the 'lit' API to be able to *write*
+        # substitutions?
+
----------------
jdenny wrote:
> Endill wrote:
> > I don't see why we shouldn't provide such an API to PYTHON directives, but it's out of scope of this patch.
> I agree we should consider that later.
> 
> One reason is we need to think about the interface.   (For example, I'm currently inclined to have separate define and redefine functions for safety, but others might disagree.)
> 
> Another reason is that, if PYTHON directives can change substitutions, it would not generally be possible to expand substitutions in RUN lines appearing after PYTHON directives until those PYTHON directives have been executed. That might impact the "Script:" discussion under D154984, so let's settle that discussion first.
> For example, I'm currently inclined to have separate define and redefine functions for safety

I (again) missed that it's DEFINE and REDEFINE we're talking about here. Sorry for that. As I expressed earlier in our private conversation, I hope PYTHON to subsume REDEFINE, so we wouldn't need to think hard about exposing it to PYTHON directive. But DEFINE is a different story. I agree that we should wait for that discussion to settle.


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

https://reviews.llvm.org/D154987



More information about the libcxx-commits mailing list