[PATCH] D68730: [llvm-objdump] Adjust spacing and field width for --section-headers

James Henderson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 29 03:56:09 PDT 2019


jhenderson added inline comments.


================
Comment at: llvm/test/tools/llvm-objdump/section-headers.test:7
+# RUN: llvm-objdump -h --show-lma %t-whitespace.o \
+# RUN:   | FileCheck %s --check-prefix=WHITESPACE --strict-whitespace
+# RUN: llvm-objdump -h %t-whitespace.o \
----------------
No need to change this, but rather than using {{^}} and {{$}} you could have used --match-full-lines instead. Combined with --strict-whitespace, this will ensure that the line checked matches exactly the specified string. The downside is the lack of a space after the FileCheck pattern name, but you can solve that with additional spacing:


```
#      WHITESPACE:Sections:
# WHITESPACE-NEXT:Idx Name
```
or (I think, though not tested):
```
# WHITESPACE     :Sections:
# WHITESPACE-NEXT:Idx Name
```


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D68730





More information about the llvm-commits mailing list