[PATCH] D66282: [llvm-objcopy][MachO] Implement --remove-section

James Henderson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 19 03:06:19 PDT 2019


jhenderson added inline comments.


================
Comment at: llvm/test/tools/llvm-objcopy/MachO/remove-section.test:6
+
+## Error case 1: Invalid section name.
+# RUN: not llvm-objcopy --remove-section __text %t %t2 2>&1 \
----------------
"Error case 1:" is meaningless without other error cases.


================
Comment at: llvm/test/tools/llvm-objcopy/MachO/remove-section.test:62
+# RUN:   | FileCheck %s --check-prefix=REMOVE-MULTIPLE-SECTIONS
+# REMOVE-MULTIPLE-SECTIONS:      Sections [
+# REMOVE-MULTIPLE-SECTIONS-NEXT:   Section {
----------------
How easy would it be to use FileCheck --check-prefixes, and possibly -D<NAME> options to share this block with the previous test case? That would avoid duplicating a big chunk of the expected output. You could do something like:


```
# RUN: ... | FileCheck --check-prefixes=REMOVE-COMMON,REMOVE-TEXT-ONLY
# RUN: ... | FileCheck --check-prefixes=REMOVE-COMMON

# REMOVE-COMMON:
# REMOVE-COMMON-NEXT:
...
# REMOVE-TEXT-ONLY-NEXT:
# REMOVE-TEXT-ONLY-NEXT:
...
# REMOVE-COMMON-NEXT:
```


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D66282





More information about the llvm-commits mailing list