2 RUN: llc -mtriple x86_64-windows-msvc -filetype obj -o alpha.obj %S/Inputs/alpha.ll
3 RUN: llc -mtriple x86_64-windows-msvc -filetype obj -o beta.obj %S/Inputs/beta.ll
4 RUN: lld-link /out:alpha.dll /dll alpha.obj /implib:alpha.lib
5 RUN: not lld-link /out:beta.dll /dll alpha.obj beta.obj alpha.lib 2>&1 | FileCheck %s -check-prefix CHECK-ALPHA
7 CHECK-ALPHA: error: duplicate symbol: f
8 CHECK-ALPHA: defined at {{.*}}alpha.obj
9 CHECK-APLHA: defined at alpha.dll
11 RUN: llc -mtriple x86_64-windows-msvc -filetype obj -o gamma.obj %S/Inputs/gamma.ll
12 RUN: not lld-link /out:gamma.exe /subsystem:console /entry:mainCRTStartup gamma.obj alpha.lib 2>&1 | FileCheck %s -check-prefix CHECK-GAMMA
14 CHECK-GAMMA: error: duplicate symbol: __declspec(dllimport) f
15 CHECK-GAMMA: defined at {{.*}}gamma.obj
16 CHECK-GAMMA: defined at alpha.lib(alpha.dll)