20 lines · plain
1# REQUIRES: x862# RUN: llvm-mc -filetype=obj -triple=x86_64 %s -o %t.o3 4## The reference is mangled while the definition is not, suggest a missing5## extern "C".6# RUN: echo 'call _Z3fooi' | llvm-mc -filetype=obj -triple=x86_64 - -o %t1.o7# RUN: not ld.lld %t.o %t1.o -o /dev/null 2>&1 | FileCheck %s8 9# CHECK: error: undefined symbol: foo(int)10# CHECK-NEXT: >>> referenced by {{.*}}11# CHECK-NEXT: >>> did you mean: extern "C" foo12 13## Don't suggest for nested names like F::foo() and foo::foo().14# RUN: echo 'call _ZN1F3fooEv; call _ZN3fooC1Ev' | llvm-mc -filetype=obj -triple=x86_64 - -o %t2.o15# RUN: not ld.lld %t.o %t2.o -o /dev/null 2>&1 | FileCheck /dev/null --implicit-check-not='did you mean'16 17.globl _start, foo18_start:19foo:20