Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / lld / test / COFF / subsystem-inference2.test
bloba9d75c8af122a5acfff1f983fe37bed35a9eea90
1 # RUN: yaml2obj %s -o %t.obj
2 # RUN: lld-link /out:%t.exe %t.obj 2>&1 | FileCheck -check-prefix=WARN %s
3 # RUN: llvm-readobj --file-headers %t.exe | FileCheck %s
5 # WARN: warning: found main and WinMain; defaulting to /subsystem:console
6 # CHECK:     Subsystem: IMAGE_SUBSYSTEM_WINDOWS_CUI
8 --- !COFF
9 header:
10   Machine:         IMAGE_FILE_MACHINE_AMD64
11   Characteristics: []
12 sections:
13   - Name:            .text
14     Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ ]
15     Alignment:       4
16     SectionData:     B82A000000C3
17 symbols:
18   - Name:            .text
19     Value:           0
20     SectionNumber:   1
21     SimpleType:      IMAGE_SYM_TYPE_NULL
22     ComplexType:     IMAGE_SYM_DTYPE_NULL
23     StorageClass:    IMAGE_SYM_CLASS_STATIC
24     SectionDefinition:
25       Length:          6
26       NumberOfRelocations: 0
27       NumberOfLinenumbers: 0
28       CheckSum:        0
29       Number:          0
30   - Name:            main
31     Value:           0
32     SectionNumber:   1
33     SimpleType:      IMAGE_SYM_TYPE_NULL
34     ComplexType:     IMAGE_SYM_DTYPE_NULL
35     StorageClass:    IMAGE_SYM_CLASS_EXTERNAL
36   - Name:            WinMain
37     Value:           0
38     SectionNumber:   1
39     SimpleType:      IMAGE_SYM_TYPE_NULL
40     ComplexType:     IMAGE_SYM_DTYPE_NULL
41     StorageClass:    IMAGE_SYM_CLASS_EXTERNAL
42   - Name:            mainCRTStartup
43     Value:           0
44     SectionNumber:   1
45     SimpleType:      IMAGE_SYM_TYPE_NULL
46     ComplexType:     IMAGE_SYM_DTYPE_NULL
47     StorageClass:    IMAGE_SYM_CLASS_EXTERNAL
48   - Name:            WinMainCRTStartup
49     Value:           0
50     SectionNumber:   1
51     SimpleType:      IMAGE_SYM_TYPE_NULL
52     ComplexType:     IMAGE_SYM_DTYPE_NULL
53     StorageClass:    IMAGE_SYM_CLASS_EXTERNAL
54 ...