• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# REQUIRES: x86
2# RUN: llvm-mc -triple=x86_64-windows-msvc -filetype=obj -o %t.obj %s
3# RUN: not lld-link /out:%t.exe %t.obj 2>&1 | FileCheck %s
4
5# CHECK: error: undefined symbol: int __cdecl foo(void)
6# CHECK-NEXT: >>> referenced by file1.cpp:1
7# CHECK-NEXT: >>>               {{.*}}.obj:(main)
8# CHECK-NEXT: >>> referenced by file1.cpp:2
9# CHECK-NEXT: >>>               {{.*}}.obj:(main)
10# CHECK-EMPTY:
11# CHECK-NEXT: error: undefined symbol: int __cdecl bar(void)
12# CHECK-NEXT: >>> referenced by file2.cpp:3
13# CHECK-NEXT: >>>               {{.*}}.obj:(main)
14# CHECK-NEXT: >>> referenced by file1.cpp:4
15# CHECK-NEXT: >>>               {{.*}}.obj:(f1)
16# CHECK-EMPTY:
17# CHECK-NEXT: error: undefined symbol: int __cdecl baz(void)
18# CHECK-NEXT: >>> referenced by file1.cpp:5
19# CHECK-NEXT: >>>               {{.*}}.obj:(f2)
20
21	.cv_file	1 "file1.cpp" "EDA15C78BB573E49E685D8549286F33C" 1
22	.cv_file	2 "file2.cpp" "EDA15C78BB573E49E685D8549286F33D" 1
23
24        .section        .text,"xr",one_only,main
25.globl main
26main:
27	.cv_func_id 0
28	.cv_loc	0 1 1 0 is_stmt 0
29	call	"?foo@@YAHXZ"
30	.cv_loc	0 1 2 0
31	call	"?foo@@YAHXZ"
32	.cv_loc	0 2 3 0
33	call	"?bar@@YAHXZ"
34.Lfunc_end0:
35
36f1:
37	.cv_func_id 1
38	.cv_loc	1 1 4 0 is_stmt 0
39	call	"?bar@@YAHXZ"
40.Lfunc_end1:
41
42        .section        .text,"xr",one_only,f2
43.globl f2
44f2:
45	.cv_func_id 2
46	.cv_loc	2 1 5 0 is_stmt 0
47	call	"?baz@@YAHXZ"
48.Lfunc_end2:
49
50	.section	.debug$S,"dr",associative,main
51	.long	4
52	.cv_linetable	0, main, .Lfunc_end0
53	.cv_linetable	1, f1, .Lfunc_end1
54
55	.section	.debug$S,"dr",associative,f2
56	.long	4
57	.cv_linetable	2, f2, .Lfunc_end2
58
59	.section	.debug$S,"dr"
60	.long	4
61	.cv_filechecksums
62	.cv_stringtable
63