[PATCH] D31497: Add a %basename substitution

Rafael EspĂ­ndola via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 31 10:12:32 PDT 2017


But is it the base of %t, not %s.

how about %basename_t, %basename_s, etc?

Cheers,
Rafael


On 31 March 2017 at 12:26, Reid Kleckner via Phabricator
<reviews at reviews.llvm.org> wrote:
> rnk added inline comments.
>
>
> ================
> Comment at: utils/lit/lit/TestRunner.py:704
> +    tmpName = tmpBase + '.tmp'
> +    baseName = os.path.basename(tmpBase)
>      substitutions.extend([('%s', sourcepath),
> ----------------
> `%basename` doesn't seem like a very obvious substitution to me. It should be equivalent to the basename of the source path. Can you think of a more intuitive name for it? %sbase? %sbasename? %sourcebasename?
>
> We have an existing convention that capital letters are the dirname of that substitution, which is OK, but I can't think of another convention that would get the basename of that letter.
>
> I guess I like %sourcebasename best. It's long and descriptive, but this is only used inside sanitizer lit.common.cfg to form other more high-level substitutions.
>
>
> https://reviews.llvm.org/D31497
>
>
>


More information about the llvm-commits mailing list