brintos

brintos / llvm-project-archived public Read only

0
0
Text · 685 B · 4195716 Raw
32 lines · plain
1REQUIRES: x862 3RUN: rm -rf %t && mkdir -p %t && cd %t4RUN: llvm-as %S/Inputs/undefined-symbol-lto-a.ll -o t.obj5RUN: llvm-as %S/Inputs/undefined-symbol-lto-b.ll -o b.obj6RUN: llvm-lib b.obj -out:b.lib7RUN: not lld-link -entry:main -nodefaultlib t.obj b.lib -subsystem:console 2>&1 | FileCheck %s8 9CHECK: undefined symbol: main10CHECK: undefined symbol: void __cdecl undefined_ref(void)11CHECK: referenced by12 13Originally reported as PR42536.14 15a.ll corresponds to this C++:16 17struct __declspec(dllimport) S {18  virtual void foo();19};20void undefined_ref();21struct Init {22  Init() { undefined_ref(); }23  S c;24} d;25 26b.ll is from this C++:27 28struct S {29  virtual void foo();30};31void S::foo() {}32