[PATCH] D31497: Add a %basename substitution

Reid Kleckner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 31 09:26:23 PDT 2017


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