[LLVMdev] lit: deprecating trailing \ in RUN lines

Alp Toker alp at nuanti.com
Mon Dec 9 21:40:16 PST 2013


On 10/12/2013 04:20, Sean Silva wrote:
> The classic way to do this sort of checking is by hacking into the 
> tool that actually interprets it (i.e. lit in this case). Considering 
> that lit is Python, it should be pretty easy to insert an ad-hoc regex 
> check (or even something substantially more sophisticated). E.g. 
> insert code into TestRunner.py's parseIntegratedTestScript function.

Hi Sean,

Let's try to work on that then. It'll be brilliant if we can make this 
work without churn in the test suite.

I had some progress trying to get that working by building a source line 
table and moving substitutions to later in the processing pipeline so 
all the source information to map changes back are actually available now.

The difficulty is in getting the regular expression engine to use that 
to preserve source locations so we can apply the changes back to the 
original source.

I've been digging into the depths of the Python regex implementation and 
tried inserting line break markers together with the multiline option 
but it didn't work out -- if can help find a way to do that then I think 
all the information we need is there to map back to the original lines 
and apply changes..

Alp.

-- 
http://www.nuanti.com
the browser experts




More information about the llvm-dev mailing list