[PATCH] D18699: [ELF] - Teach linkerscript error handler to show full script line + column marker on error.

George Rimar via llvm-commits llvm-commits at lists.llvm.org
Sat Apr 2 13:20:47 PDT 2016


grimar added inline comments.

================
Comment at: test/ELF/linkerscript-diagnostic.s:66
@@ +65,2 @@
+# ERR7: boom .temp : { *(.temp) }
+# ERR7: {{[ ]{7}\^}}
----------------
ruiu wrote:
> grimar wrote:
> > ruiu wrote:
> > > grimar wrote:
> > > > I found that this test does not work. I had issues with counting spaces before also, then changed
> > > > 
> > > > ```
> > > > # RUN: not ld.lld -shared %t -o %t1 --script %t.script  2>&1 | FileCheck ...
> > > > ```
> > > > to current
> > > > 
> > > > ```
> > > > # RUN: not ld.lld -shared %t -o %t1 --script %t.script > %t.log 2>&1
> > > > # FileCheck -check-prefix=ERR7 %s < %t.log
> > > > ```
> > > > 
> > > > So added a file. And problems were gone. I thought it is ok now, but at fact I found now that it accepts any number in expression:
> > > > 
> > > > ```
> > > > {{[ ]{7}\^}}
> > > > {{[ ]{70}\^}}
> > > > {{[ ]{700}\^}}
> > > > ```
> > > > 
> > > > All above accepts with file. 
> > > > I tried other variants that should be valid in real live:
> > > > 
> > > > ```
> > > > {{[ ]{5}\^}}}
> > > > {{[\s]{5}\^}}}
> > > > {{[\x20]{5}\^}}}
> > > > ```
> > > > 
> > > > Nothing works. So now I am searching for a way to check amount of spaces before '^' for testcase.
> > > I haven't tried, but does this work?
> > > 
> > >   {{.......^}}
> > Always pass, no matter how many dots I put.
> It is because you forgot to write "RUN:" before FileCheck.
:( Thanks you, that was true.
And I still stuck on the counting whitespaces. When I replace space with "-", then
```
{{[-]{5}\^}}}
```
Works just perfect, but the same for spaces:

```
{{[ ]{5}\^}}}
```
not works. This seems to me ubnormal behavior of regexp in testsuite.
Continuing investigation how to fix..


http://reviews.llvm.org/D18699





More information about the llvm-commits mailing list