[PATCH] D39023: lit: Improve %: normalization.

Zachary Turner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 17 16:32:44 PDT 2017


zturner added a comment.

In https://reviews.llvm.org/D39023#900213, @ruiu wrote:

> I introduced `%:X` lit variables for linkrepro tests, and I doubt we use them in other tests.


In that case, I would suggest a couple of different alternatives:

1. If it's really not usable outside of LLD, add the substitutions to LLD's `lit.cfg.py` instead of to LLVM's `TestRunner.py`.  A person writing a test for clang doesn't care about linkrepro TAR files and shouldn't have to understand how this comment applies to them.  Worse, lit is downloadable as a public package from various package managesr, and these people using lit are not even doing anything related to LLVM (or even compilers) at all.  It doesn't make sense for them to read a comment about linkrepro tar files.  If it's in the core lit infrastructure, it has to be independent of how we (LLVM/LLD/Clang) decide to use it.

2. Re-write the comment to explain what it does, but don't mention linkrepro or tar files.  For the same reason as above.  (Basically: Just delete the second sentence).

I did a grep of the code, and you're right that these substitutions are not used outside of lld.  For that reason, number 1 seems more "correct", but number 2 is less work to change.


https://reviews.llvm.org/D39023





More information about the llvm-commits mailing list