2 # RUN: llvm-mc -triple=i386-windows-gnu -filetype=obj -o %t.o %s
3 # RUN: not lld-link /lldmingw /out:%t.exe %t.o 2>&1 | FileCheck %s
4 # RUN: not lld-link /lldmingw /out:%t.exe /demangle %t.o 2>&1 | FileCheck %s
5 # RUN: not lld-link /lldmingw /out:%t.exe /demangle:no %t.o 2>&1 | FileCheck --check-prefix=NODEMANGLE %s
7 # NODEMANGLE: error: undefined symbol: __Z3fooi
8 # NODEMANGLE: error: undefined symbol: __Z3barPKc
9 # NODEMANGLE: error: undefined symbol: __imp___Z3bazv
10 # NODEMANGLE: error: undefined symbol: _Z3fooi
11 # NODEMANGLE: error: undefined symbol: __imp__cfunc
13 # CHECK: error: undefined symbol: foo(int)
14 # CHECK-NEXT: >>> referenced by {{.*}}.o:(_main)
15 # CHECK-NEXT: >>> referenced by {{.*}}.o:(_main)
17 # CHECK-NEXT: error: undefined symbol: bar(char const*)
18 # CHECK-NEXT: >>> referenced by {{.*}}.o:(_main)
19 # CHECK-NEXT: >>> referenced by {{.*}}.o:(_f1)
21 # CHECK-NEXT: error: undefined symbol: __declspec(dllimport) baz()
22 # CHECK-NEXT: >>> referenced by {{.*}}.o:(_f2)
24 # CHECK-NEXT: error: undefined symbol: _Z3fooi
25 # CHECK-NEXT: >>> referenced by {{.*}}.o:(_f2)
27 # CHECK-NEXT: error: undefined symbol: __declspec(dllimport) _cfunc
28 # CHECK-NEXT: >>> referenced by {{.*}}.o:(_f2)
30 .section .text,"xr",one_only,_main
41 .section .text,"xr",one_only,_f2