[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 11:43:43 PDT 2016


grimar added inline comments.

================
Comment at: test/ELF/linkerscript-diagnostic.s:66
@@ +65,2 @@
+# ERR7: boom .temp : { *(.temp) }
+# ERR7: {{[ ]{7}\^}}
----------------
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.


http://reviews.llvm.org/D18699





More information about the llvm-commits mailing list