• 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# RUN: not lld-link /out:%t.exe /demangle %t.obj 2>&1 | FileCheck %s
5# RUN: not lld-link /out:%t.exe /demangle:no %t.obj 2>&1 | FileCheck --check-prefix=NODEMANGLE %s
6
7# NODEMANGLE: error: undefined symbol: ?foo@@YAHXZ
8# NODEMANGLE: error: undefined symbol: ?bar@@YAHXZ
9# NODEMANGLE: error: undefined symbol: __imp_?baz@@YAHXZ
10# NODEMANGLE: error: undefined symbol: __imp_undecorated
11
12# CHECK: error: undefined symbol: int __cdecl foo(void)
13# CHECK-NEXT: >>> referenced by {{.*}}.obj:(main)
14# CHECK-NEXT: >>> referenced by {{.*}}.obj:(main)
15# CHECK-EMPTY:
16# CHECK-NEXT: error: undefined symbol: int __cdecl bar(void)
17# CHECK-NEXT: >>> referenced by {{.*}}.obj:(main)
18# CHECK-NEXT: >>> referenced by {{.*}}.obj:(f1)
19# CHECK-EMPTY:
20# CHECK-NEXT: error: undefined symbol: __declspec(dllimport) int __cdecl baz(void)
21# CHECK-NEXT: >>> referenced by {{.*}}.obj:(f2)
22# CHECK-EMPTY:
23# CHECK-NEXT: error: undefined symbol: __declspec(dllimport) undecorated
24# CHECK-NEXT: >>> referenced by {{.*}}.obj:(f2)
25
26        .section        .text,"xr",one_only,main
27.globl main
28main:
29	call	"?foo@@YAHXZ"
30	call	"?foo@@YAHXZ"
31	call	"?bar@@YAHXZ"
32
33f1:
34	call	"?bar@@YAHXZ"
35.Lfunc_end1:
36
37        .section        .text,"xr",one_only,f2
38.globl f2
39f2:
40	callq	*"__imp_?baz@@YAHXZ"(%rip)
41	callq	*__imp_undecorated(%rip)
42