brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.6 KiB · 14c73c3 Raw
50 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=namespace %t | \6// RUN:   FileCheck --check-prefix=FOO %s7// RUN: lldb-test symbols --name=foo --find=namespace --context=context %t | \8// RUN:   FileCheck --check-prefix=CONTEXT %s9// RUN: lldb-test symbols --name=not_there --find=namespace %t | \10// RUN:   FileCheck --check-prefix=EMPTY %s11//12// RUN: %clangxx %s -g -c -o %t --target=x86_64-apple-macosx13// RUN: lldb-test symbols --name=foo --find=namespace %t | \14// RUN:   FileCheck --check-prefix=FOO %s15// RUN: lldb-test symbols --name=foo --find=namespace --context=context %t | \16// RUN:   FileCheck --check-prefix=CONTEXT %s17// RUN: lldb-test symbols --name=not_there --find=namespace %t | \18// RUN:   FileCheck --check-prefix=EMPTY %s19 20// RUN: %clangxx %s -c -o %t.o --target=x86_64-pc-linux -gdwarf-5 -gpubnames21// RUN: ld.lld %t.o -o %t22// RUN: llvm-readobj --sections %t | FileCheck %s --check-prefix NAMES23// RUN: lldb-test symbols --name=foo --find=namespace %t | \24// RUN:   FileCheck --check-prefix=FOO %s25// RUN: lldb-test symbols --name=foo --find=namespace --context=context %t | \26// RUN:   FileCheck --check-prefix=CONTEXT %s27// RUN: lldb-test symbols --name=not_there --find=namespace %t | \28// RUN:   FileCheck --check-prefix=EMPTY %s29 30// NAMES: Name: .debug_names31 32// FOO: Found namespace: foo33 34// CONTEXT: Found namespace: bar::foo35 36// EMPTY: Namespace not found.37 38namespace foo {39int X;40}41 42namespace bar {43int context;44namespace foo {45int X;46}47} // namespace bar48 49extern "C" void _start() {}50