diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2018-07-28 11:09:23 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2018-07-28 11:09:23 +0000 |
| commit | f73363f1dd94996356cefbf24388f561891acf0b (patch) | |
| tree | e3c31248bdb36eaec5fd833490d4278162dba2a0 /lit/SymbolFile/DWARF/find-function-regex.cpp | |
| parent | 160ee69dd7ae18978f4068116777639ea98dc951 (diff) | |
Notes
Diffstat (limited to 'lit/SymbolFile/DWARF/find-function-regex.cpp')
| -rw-r--r-- | lit/SymbolFile/DWARF/find-function-regex.cpp | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/lit/SymbolFile/DWARF/find-function-regex.cpp b/lit/SymbolFile/DWARF/find-function-regex.cpp new file mode 100644 index 000000000000..2e099eb4fd74 --- /dev/null +++ b/lit/SymbolFile/DWARF/find-function-regex.cpp @@ -0,0 +1,26 @@ +// REQUIRES: lld + +// RUN: clang %s -g -c -o %t.o --target=x86_64-pc-linux -mllvm -accel-tables=Disable +// RUN: ld.lld %t.o -o %t +// RUN: lldb-test symbols --name=f.o --regex --find=function %t | FileCheck %s +// +// RUN: clang %s -g -c -o %t --target=x86_64-apple-macosx +// RUN: lldb-test symbols --name=f.o --regex --find=function %t | FileCheck %s + +// RUN: clang %s -g -c -o %t.o --target=x86_64-pc-linux -mllvm -accel-tables=Dwarf +// RUN: ld.lld %t.o -o %t +// RUN: lldb-test symbols --name=f.o --regex --find=function %t | FileCheck %s + +// CHECK: Found 3 functions: +// CHECK-DAG: name = "foo()", mangled = "_Z3foov" +// CHECK-DAG: name = "ffo()", mangled = "_Z3ffov" +// CHECK-DAG: name = "bar::foo()", mangled = "_ZN3bar3fooEv" + +void foo() {} +void ffo() {} +namespace bar { +void foo() {} +} // namespace bar +void fof() {} + +extern "C" void _start() {} |
