3 RUN: rm -rf %t && mkdir -p %t && cd %t
4 RUN: llvm-as %S/Inputs/undefined-symbol-lto-a.ll -o t.obj
5 RUN: llvm-as %S/Inputs/undefined-symbol-lto-b.ll -o b.obj
6 RUN: llvm-lib b.obj -out:b.lib
7 RUN: not lld-link -entry:main -nodefaultlib t.obj b.lib -subsystem:console 2>&1 | FileCheck %s
9 CHECK: undefined symbol: main
10 CHECK: undefined symbol: void __cdecl undefined_ref(void)
13 Originally reported as PR42536.
15 a.ll corresponds to this C++:
17 struct __declspec(dllimport) S {
22 Init() { undefined_ref(); }
26 b.ll is from this C++: