[PATCH] D44240: utils: add a helper class to lit for captured substitutions

Zachary Turner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 8 11:06:19 PST 2018


zturner added inline comments.


================
Comment at: utils/lit/lit/TestingConfig.py:157
+    Helper class to indicate that the substitutions contains backreferences.
+    '''
+    def __init__(self, substitution):
----------------
rnk wrote:
> Since there is no user of this in LLVM, can you put some example usage code in the docstring? In lit.cfg, use this code to create substitutions with regex backreferences:
>   config.substutions.append(('\b[^ ]*.cpp', SubstituteCaptures('\0.txt')))
Alternatively, add a lit lit test for it.


Repository:
  rL LLVM

https://reviews.llvm.org/D44240





More information about the llvm-commits mailing list