[llvm] [llvm][docs] Correct description of %t lit substitution (PR #164397)
David Spickett via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 21 04:08:08 PDT 2025
https://github.com/DavidSpickett created https://github.com/llvm/llvm-project/pull/164397
%t is currently documented as:
temporary file name unique to the test
Which I take to mean if the path is a/b/c/tempfile, then %t would be tempfile. It is not, it's the whole path.
(which is hinted at by %basename_t, but why would you read that if you didn't need to use it)
As seen in #164396 this can create confusion when people use it as if it were just the file name.
Make it clear in the docs that this is the path of a file.
>From 46365a0e49a14e47412cc356bdcc967c041acd9a Mon Sep 17 00:00:00 2001
From: David Spickett <david.spickett at linaro.org>
Date: Tue, 21 Oct 2025 11:05:12 +0000
Subject: [PATCH] [llvm][docs] Correct description of %t lit substitution
%t is currently documented as:
temporary file name unique to the test
Which I take to mean if the path is a/b/c/tempfile, then
%t would be tempfile. It is not, it's the whole path.
(which is hinted at by %basename_t, but why would you read
that if you didn't need to use it)
As seen in #164396 this can create confusion when people use
it as if it were just the file name.
Make it clear in the docs that this is the path of a file.
---
llvm/docs/CommandGuide/lit.rst | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/llvm/docs/CommandGuide/lit.rst b/llvm/docs/CommandGuide/lit.rst
index 70daae46170cd..89adb003832ef 100644
--- a/llvm/docs/CommandGuide/lit.rst
+++ b/llvm/docs/CommandGuide/lit.rst
@@ -628,7 +628,7 @@ TestRunner.py:
%{fs-src-root} root component of file system paths pointing to the LLVM checkout
%{fs-tmp-root} root component of file system paths pointing to the test's temporary directory
%{fs-sep} file system path separator
- %t temporary file name unique to the test
+ %t the path of a temporary file unique to the test
%basename_t The last path component of %t but without the ``.tmp`` extension (deprecated, use ``%{t:stem}`` instead)
%% %
%/s %s but ``\`` is replaced by ``/``
More information about the llvm-commits
mailing list