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

James Henderson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 5 05:25:02 PST 2021


jhenderson added inline comments.


================
Comment at: llvm/test/tools/llvm-readobj/ELF/note-generic.s:22
+// GNU-NEXT:   XYZ                  0x00000000	func
+// GNU-EMPTY:
 
----------------
arichardson wrote:
> 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: {{.}}
> ```
Fair enough. Something to look at another time, I guess. I'd just delete this line and call it good then, but happy for you to do something else too.


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