[PATCH] D96010: [llvm-readobj] Print empty line between note sections in GNU mode

Alexander Richardson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 5 03:59:31 PST 2021


arichardson added inline comments.


================
Comment at: llvm/test/tools/llvm-readobj/ELF/note-generic.s:22
+// GNU-NEXT:   XYZ                  0x00000000	func
+// GNU-EMPTY:
 
----------------
jhenderson wrote:
> arichardson wrote:
> > jhenderson wrote:
> > > This is slightly surprising now, though probably harmless.
> > I think FileCheck also matches EOF for -EMPTY? Or possibly it matches the `\n` after `func`.
> Yes, it'll be something like the matching EOF line (after all, there is no output at that point). It's not really worth worrying about though. I'm not sure if there's a clear fix. Maybe a `CHECK-NOT: {{.}}` would make more sense?
That seems to do the same (since the last match ends before the newline. I can't find a way to make it fail if there is an extra newline (other than e.g. piping to `hexdump`).

This also works fine if the output ends in \n\n:
```
// GNU-NEXT:   XYZ                  0x00000000	func{{$}}
// GNU-NOT: {{.}}
```


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D96010/new/

https://reviews.llvm.org/D96010



More information about the llvm-commits mailing list