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

Reid Kleckner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 8 10:29:32 PST 2018


rnk accepted this revision.
rnk added a comment.
This revision is now accepted and ready to land.

lgtm



================
Comment at: utils/lit/lit/TestingConfig.py:157
+    Helper class to indicate that the substitutions contains backreferences.
+    '''
+    def __init__(self, substitution):
----------------
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')))


Repository:
  rL LLVM

https://reviews.llvm.org/D44240





More information about the llvm-commits mailing list