40 lines · cpp
1// REQUIRES: lld2 3// RUN: %clangxx %s -g -c -o %t.o --target=x86_64-pc-linux -gno-pubnames4// RUN: ld.lld %t.o -o %t5// RUN: lldb-test symbols --name=foo --find=function --function-flags=method %t | \6// RUN: FileCheck %s7//8// RUN: %clangxx %s -g -c -o %t --target=x86_64-apple-macosx9// RUN: lldb-test symbols --name=foo --find=function --function-flags=method %t | \10// RUN: FileCheck %s11 12// RUN: %clangxx %s -c -o %t.o --target=x86_64-pc-linux -gdwarf-5 -gpubnames13// RUN: ld.lld %t.o -o %t14// RUN: llvm-readobj --sections %t | FileCheck %s --check-prefix NAMES15// RUN: lldb-test symbols --name=foo --find=function --function-flags=method %t | \16// RUN: FileCheck %s17 18// NAMES: Name: .debug_names19 20// CHECK-DAG: name = "A::foo()", mangled = "_ZN1A3fooEv"21// CHECK-DAG: name = "B::foo()", mangled = "_ZN1B3fooEv"22// CHECK-DAG: name = "C::foo()", mangled = "_ZN1C3fooEv"23 24struct A {25 void foo();26};27void A::foo() {}28 29class B {30 void foo();31};32void B::foo() {}33 34union C {35 void foo();36};37void C::foo() {}38 39extern "C" void _start() {}40