[memprof] Remove an unused using directive (#117004)
[llvm-project.git] / lld / test / COFF / undefined-symbol-cv.s
blob502f28044c17f0823f99e71bb90657e6e2be98d2
1 # REQUIRES: aarch64, x86
2 # RUN: split-file %s %t.dir && cd %t.dir
4 # RUN: llvm-mc -triple=x86_64-windows-msvc -filetype=obj -o test-x86_64.obj test-x86_64.s
5 # RUN: llvm-mc -triple=aarch64-windows-msvc -filetype=obj -o test-aarch64.obj test-aarch64.s
6 # RUN: llvm-mc -triple=arm64ec-windows-msvc -filetype=obj -o test-arm64ec.obj test-aarch64.s
8 # RUN: not lld-link -out:test-x86_64.exe test-x86_64.obj 2>&1 | FileCheck %s
9 # RUN: not lld-link -out:test-aarch64.exe test-aarch64.obj 2>&1 | FileCheck %s
10 # RUN: not lld-link -out:test-arm64ec.exe -machine:arm64ec test-arm64ec.obj 2>&1 | FileCheck %s
11 # RUN: not lld-link -out:test-arm64ec2.exe -machine:arm64ec test-x86_64.obj 2>&1 | FileCheck %s
13 # CHECK: error: undefined symbol: int __cdecl foo(void)
14 # CHECK-NEXT: >>> referenced by file1.cpp:1
15 # CHECK-NEXT: >>> {{.*}}.obj:(main)
16 # CHECK-NEXT: >>> referenced by file1.cpp:2
17 # CHECK-NEXT: >>> {{.*}}.obj:(main)
18 # CHECK-EMPTY:
19 # CHECK-NEXT: error: undefined symbol: int __cdecl bar(void)
20 # CHECK-NEXT: >>> referenced by file2.cpp:3
21 # CHECK-NEXT: >>> {{.*}}.obj:(main)
22 # CHECK-NEXT: >>> referenced by file1.cpp:4
23 # CHECK-NEXT: >>> {{.*}}.obj:(f1)
24 # CHECK-EMPTY:
25 # CHECK-NEXT: error: undefined symbol: int __cdecl baz(void)
26 # CHECK-NEXT: >>> referenced by file1.cpp:5
27 # CHECK-NEXT: >>> {{.*}}.obj:(f2)
29 #--- test-x86_64.s
30 .cv_file 1 "file1.cpp" "EDA15C78BB573E49E685D8549286F33C" 1
31 .cv_file 2 "file2.cpp" "EDA15C78BB573E49E685D8549286F33D" 1
33 .section .text,"xr",one_only,main
34 .globl main
35 main:
36 .cv_func_id 0
37 .cv_loc 0 1 1 0 is_stmt 0
38 call "?foo@@YAHXZ"
39 .cv_loc 0 1 2 0
40 call "?foo@@YAHXZ"
41 .cv_loc 0 2 3 0
42 call "?bar@@YAHXZ"
43 .Lfunc_end0:
45 f1:
46 .cv_func_id 1
47 .cv_loc 1 1 4 0 is_stmt 0
48 call "?bar@@YAHXZ"
49 .Lfunc_end1:
51 .section .text,"xr",one_only,f2
52 .globl f2
53 f2:
54 .cv_func_id 2
55 .cv_loc 2 1 5 0 is_stmt 0
56 call "?baz@@YAHXZ"
57 .Lfunc_end2:
59 .section .debug$S,"dr",associative,main
60 .long 4
61 .cv_linetable 0, main, .Lfunc_end0
62 .cv_linetable 1, f1, .Lfunc_end1
64 .section .debug$S,"dr",associative,f2
65 .long 4
66 .cv_linetable 2, f2, .Lfunc_end2
68 .section .debug$S,"dr"
69 .long 4
70 .cv_filechecksums
71 .cv_stringtable
73 #--- test-aarch64.s
74 .cv_file 1 "file1.cpp" "EDA15C78BB573E49E685D8549286F33C" 1
75 .cv_file 2 "file2.cpp" "EDA15C78BB573E49E685D8549286F33D" 1
77 .section .text,"xr",one_only,main
78 .globl main
79 main:
80 .cv_func_id 0
81 .cv_loc 0 1 1 0 is_stmt 0
82 bl "?foo@@YAHXZ"
83 .cv_loc 0 1 2 0
84 bl "?foo@@YAHXZ"
85 .cv_loc 0 2 3 0
86 b "?bar@@YAHXZ"
87 .Lfunc_end0:
89 f1:
90 .cv_func_id 1
91 .cv_loc 1 1 4 0 is_stmt 0
92 bl "?bar@@YAHXZ"
93 .Lfunc_end1:
95 .section .text,"xr",one_only,f2
96 .globl f2
97 f2:
98 .cv_func_id 2
99 .cv_loc 2 1 5 0 is_stmt 0
100 bl "?baz@@YAHXZ"
101 .Lfunc_end2:
103 .section .debug$S,"dr",associative,main
104 .long 4
105 .cv_linetable 0, main, .Lfunc_end0
106 .cv_linetable 1, f1, .Lfunc_end1
108 .section .debug$S,"dr",associative,f2
109 .long 4
110 .cv_linetable 2, f2, .Lfunc_end2
112 .section .debug$S,"dr"
113 .long 4
114 .cv_filechecksums
115 .cv_stringtable