[PATCH] D42805: [utils] Refactor utils/update_{, llc_}test_checks.py to share more code
Roman Lebedev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Jun 23 03:16:27 PDT 2018
lebedev.ri added inline comments.
================
Comment at: llvm/trunk/utils/UpdateTestChecks/common.py:64
+ # whitespace in place.
+ body = SCRUB_WHITESPACE_RE.sub(r' ', body)
+ # Expand the tabs used for indentation.
----------------
RKSimon wrote:
> MaskRay wrote:
> > lebedev.ri wrote:
> > > Hi @MaskRay.
> > >
> > > I think there is something wrong with this particular line.
> > >
> > > If the whitespace isn't leading/trailing, removing it will change the line,
> > > and FileCheck will no longer match this line. So, how can we even do this?
> > >
> > > This particular line breaks `utils/update_analyze_test_checks.py`
> > > Try on `test/Analysis/ScalarEvolution/*mask.ll`
> > Sorry but I don't have any idea what has been going on... When I spli clean up the script... utils/update_analyze_test_checks.py did not exist then..
> I wouldn't be surprised if I got something wrong on the analyze script - I wrote it for cost models only so other analysis passes weren't tested. If you can create a bugzilla with a simple repro I'll take a look (but I may need guidance from people who spend more time with python that I do).
This is the only problem. I think this line is just wrong.
How can we change the inner context of the check line,
if we don't replace it with some [[:whitespace:]] globs or something?
Repository:
rL LLVM
https://reviews.llvm.org/D42805
More information about the llvm-commits
mailing list