2 # RUN: llvm-mc -triple=x86_64-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
11 # CHECK: error: undefined symbol: foo(int)
12 # CHECK-NEXT: >>> referenced by {{.*}}.o:(main)
13 # CHECK-NEXT: >>> referenced by {{.*}}.o:(main)
15 # CHECK-NEXT: error: undefined symbol: bar(char const*)
16 # CHECK-NEXT: >>> referenced by {{.*}}.o:(main)
17 # CHECK-NEXT: >>> referenced by {{.*}}.o:(f1)
19 # CHECK-NEXT: error: undefined symbol: __declspec(dllimport) baz()
20 # CHECK-NEXT: >>> referenced by {{.*}}.o:(f2)
22 .section .text,"xr",one_only,main
33 .section .text,"xr",one_only,f2
36 callq
*__imp__Z3bazv
(%rip
)