Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / lld / test / COFF / subsystem-inference.test
bloba024a61e3df96750538786e2c591561bd79f596e
1 # RUN: sed -e s/ENTRYNAME/main/ %s | yaml2obj > %t.obj
2 # RUN: lld-link /out:%t.exe %t.obj
3 # RUN: llvm-readobj --file-headers %t.exe | FileCheck -check-prefix=MAIN %s
4 # RUN: lld-link /out:%t.exe %t.obj /subsystem:default,6.0
5 # RUN: llvm-readobj --file-headers %t.exe | FileCheck -check-prefix=MAIN %s
7 # RUN: sed s/ENTRYNAME/wmain/ %s | yaml2obj > %t.obj
8 # RUN: lld-link /out:%t.exe %t.obj
9 # RUN: llvm-readobj --file-headers %t.exe | FileCheck -check-prefix=WMAIN %s
11 # RUN: sed s/ENTRYNAME/WinMain/ %s | yaml2obj > %t.obj
12 # RUN: lld-link /out:%t.exe %t.obj
13 # RUN: llvm-readobj --file-headers %t.exe | FileCheck -check-prefix=WINMAIN %s
14 # RUN: lld-link /out:%t.exe %t.obj /subsystem:default,6.0
15 # RUN: llvm-readobj --file-headers %t.exe | FileCheck -check-prefix=WINMAIN %s
17 # RUN: sed s/ENTRYNAME/wWinMain/ %s | yaml2obj > %t.obj
18 # RUN: lld-link /out:%t.exe %t.obj
19 # RUN: llvm-readobj --file-headers %t.exe | FileCheck -check-prefix=WWINMAIN %s
21 # MAIN:     Subsystem: IMAGE_SUBSYSTEM_WINDOWS_CUI
22 # WMAIN:    Subsystem: IMAGE_SUBSYSTEM_WINDOWS_CUI
23 # WINMAIN:  Subsystem: IMAGE_SUBSYSTEM_WINDOWS_GUI
24 # WWINMAIN: Subsystem: IMAGE_SUBSYSTEM_WINDOWS_GUI
26 --- !COFF
27 header:
28   Machine:         IMAGE_FILE_MACHINE_AMD64
29   Characteristics: []
30 sections:
31   - Name:            .text
32     Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ ]
33     Alignment:       4
34     SectionData:     B82A000000C3
35 symbols:
36   - Name:            .text
37     Value:           0
38     SectionNumber:   1
39     SimpleType:      IMAGE_SYM_TYPE_NULL
40     ComplexType:     IMAGE_SYM_DTYPE_NULL
41     StorageClass:    IMAGE_SYM_CLASS_STATIC
42     SectionDefinition:
43       Length:          6
44       NumberOfRelocations: 0
45       NumberOfLinenumbers: 0
46       CheckSum:        0
47       Number:          0
48   - Name:            ENTRYNAME
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   - Name:            mainCRTStartup
55     Value:           0
56     SectionNumber:   1
57     SimpleType:      IMAGE_SYM_TYPE_NULL
58     ComplexType:     IMAGE_SYM_DTYPE_NULL
59     StorageClass:    IMAGE_SYM_CLASS_EXTERNAL
60   - Name:            wmainCRTStartup
61     Value:           0
62     SectionNumber:   1
63     SimpleType:      IMAGE_SYM_TYPE_NULL
64     ComplexType:     IMAGE_SYM_DTYPE_NULL
65     StorageClass:    IMAGE_SYM_CLASS_EXTERNAL
66   - Name:            WinMainCRTStartup
67     Value:           0
68     SectionNumber:   1
69     SimpleType:      IMAGE_SYM_TYPE_NULL
70     ComplexType:     IMAGE_SYM_DTYPE_NULL
71     StorageClass:    IMAGE_SYM_CLASS_EXTERNAL
72   - Name:            wWinMainCRTStartup
73     Value:           0
74     SectionNumber:   1
75     SimpleType:      IMAGE_SYM_TYPE_NULL
76     ComplexType:     IMAGE_SYM_DTYPE_NULL
77     StorageClass:    IMAGE_SYM_CLASS_EXTERNAL
78 ...