[memprof] Remove an unused using directive (#117004)
[llvm-project.git] / lld / test / COFF / subsystem-inference-weak-external.s
bloba545651f0b9b57ffd3834e56f6f820b7ec09869d
1 # REQUIRES: x86
2 # RUN: rm -rf %t && split-file %s %t
4 ## Ensure that weak externals are considered during subsystem inference.
6 # RUN: llvm-mc -triple x86_64-windows-msvc -filetype obj -o %t/cui.obj %t/cui.s
7 # RUN: lld-link -out:%t/cui.exe %t/cui.obj
8 # RUN: llvm-readobj --file-headers %t/cui.exe | FileCheck --check-prefix=CUI %s
9 # RUN: llvm-mc -triple x86_64-windows-msvc -filetype obj -o %t/gui.obj %t/gui.s
10 # RUN: lld-link -out:%t/gui.exe %t/gui.obj
11 # RUN: llvm-readobj --file-headers %t/gui.exe | FileCheck --check-prefix=GUI %s
13 # CUI: Subsystem: IMAGE_SUBSYSTEM_WINDOWS_CUI
14 # GUI: Subsystem: IMAGE_SUBSYSTEM_WINDOWS_GUI
16 #--- cui.s
17 .global default_main
18 default_main:
19 ret
21 .weak main
22 main = default_main
24 .global mainCRTStartup
25 mainCRTStartup:
26 ret
28 #--- gui.s
29 .global default_WinMain
30 default_WinMain:
31 ret
33 .weak WinMain
34 WinMain = default_WinMain
36 .global WinMainCRTStartup
37 WinMainCRTStartup:
38 ret