xref: /llvm-project/llvm/test/tools/llvm-objcopy/MachO/bitcode-strip-basic.test (revision 94fba14f97233f77f30ded2fc3c2bfca9f2ce6fe)
1## Test output flag and action flag are required.
2# RUN: yaml2obj %s -o %t
3# RUN: not llvm-bitcode-strip %t 2>&1 | FileCheck --check-prefix=MISSING-OUTPUT %s
4# RUN: not llvm-bitcode-strip %t -o %t2 2>&1 | FileCheck --check-prefix=MISSING-ACTION %s
5# RUN: llvm-bitcode-strip -r %t -o %t2
6
7# MISSING-OUTPUT: error: -o is a required argument
8# MISSING-ACTION: error: no action specified
9
10--- !mach-o
11FileHeader:
12  magic:           0xFEEDFACF
13  cputype:         0x01000007
14  cpusubtype:      0x00000003
15  filetype:        0x00000001
16  ncmds:           1
17  sizeofcmds:      152
18  flags:           0x00002000
19  reserved:        0x00000000
20LoadCommands:
21  - cmd:             LC_SEGMENT_64
22    cmdsize:         152
23    segname:         __TEXT
24    vmaddr:          0
25    vmsize:          4
26    fileoff:         184
27    filesize:        4
28    maxprot:         7
29    initprot:        7
30    nsects:          1
31    flags:           0
32    Sections:
33      - sectname:        __text
34        segname:         __TEXT
35        addr:            0x0000000000000000
36        content:         'AABBCCDD'
37        size:            4
38        offset:          184
39        align:           0
40        reloff:          0x00000000
41        nreloc:          0
42        flags:           0x80000400
43        reserved1:       0x00000000
44        reserved2:       0x00000000
45        reserved3:       0x00000000
46