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
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
12 # CHECK: error: undefined symbol: int __cdecl foo(void)
13 # CHECK-NEXT: >>> referenced by {{.*}}.obj:(main)
14 # CHECK-NEXT: >>> referenced by {{.*}}.obj:(main)
16 # CHECK-NEXT: error: undefined symbol: int __cdecl bar(void)
17 # CHECK-NEXT: >>> referenced by {{.*}}.obj:(main)
18 # CHECK-NEXT: >>> referenced by {{.*}}.obj:(f1)
20 # CHECK-NEXT: error: undefined symbol: __declspec(dllimport) int __cdecl baz(void)
21 # CHECK-NEXT: >>> referenced by {{.*}}.obj:(f2)
23 # CHECK-NEXT: error: undefined symbol: __declspec(dllimport) undecorated
24 # CHECK-NEXT: >>> referenced by {{.*}}.obj:(f2)
26 .section .text,"xr",one_only,main
37 .section .text,"xr",one_only,f2
40 callq
*"__imp_?baz@@YAHXZ"(%rip
)
41 callq
*__imp_undecorated
(%rip
)