[clang][modules] Don't prevent translation of FW_Private includes when explicitly...
[llvm-project.git] / llvm / test / tools / llvm-objcopy / wasm / basic-only-section.test
blobfe47d5c027733a8f849abde214d63079245de041
1 ## Test --only-section.
2 # RUN: yaml2obj %s -o %t
3 # RUN: llvm-objcopy --only-section=foo %t %t2
4 # RUN: obj2yaml %t2 | FileCheck --implicit-check-not TYPE --implicit-check-not linking %s
6 ## Test that it's the same with only-section + keep-section (for the same section).
7 # RUN: llvm-objcopy --only-section=foo --keep-section=foo %t %t2
8 # RUN: obj2yaml %t2 | FileCheck --implicit-check-not TYPE --implicit-check-not linking %s
10 ## Also test that only-section overrides remove-section.
11 # RUN: llvm-objcopy --only-section=foo --remove-section=foo %t %t2
12 # RUN: obj2yaml %t2 | FileCheck --implicit-check-not linking %s
14 ## This file has both known and custom sections. Check that only the foo section is left.
15 # CHECK:      Sections:
16 # CHECK-NEXT:   - Type: CUSTOM
17 # CHECK-NEXT:     Name: foo
18 # CHECK-NEXT:     Payload: DEADBEEF
19 # CHECK-NEXT: ...
21 ## Test that only-section + keep-section keeps both sections.
22 # RUN: llvm-objcopy --only-section=foo --keep-section=linking %t %t2
23 # RUN: obj2yaml %t2 | FileCheck --implicit-check-not=TYPE --check-prefix=KEEP %s
24 # KEEP: Name: foo
25 # KEEP: Name: linking
27 --- !WASM
28 FileHeader:
29   Version: 0x00000001
30 Sections:
31   - Type: CUSTOM
32     Name: foo
33     Payload: DEADBEEF
34   - Type: TYPE
35     Signatures:
36       - Index: 0
37         ParamTypes:
38           - I32
39         ReturnTypes:
40           - F32
41   - Type: CUSTOM
42     Name: linking
43     Version: 2