summaryrefslogtreecommitdiffstats
path: root/lldb/test/Shell/SymbolFile/DWARF/find-method.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/test/Shell/SymbolFile/DWARF/find-method.cpp')
-rw-r--r--lldb/test/Shell/SymbolFile/DWARF/find-method.cpp31
1 files changed, 31 insertions, 0 deletions
diff --git a/lldb/test/Shell/SymbolFile/DWARF/find-method.cpp b/lldb/test/Shell/SymbolFile/DWARF/find-method.cpp
new file mode 100644
index 00000000000..7e7710fd472
--- /dev/null
+++ b/lldb/test/Shell/SymbolFile/DWARF/find-method.cpp
@@ -0,0 +1,31 @@
+// 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=foo --find=function --function-flags=method %t | \
+// RUN: FileCheck %s
+//
+// RUN: %clang %s -g -c -o %t --target=x86_64-apple-macosx
+// RUN: lldb-test symbols --name=foo --find=function --function-flags=method %t | \
+// RUN: FileCheck %s
+
+// CHECK-DAG: name = "A::foo()", mangled = "_ZN1A3fooEv"
+// CHECK-DAG: name = "B::foo()", mangled = "_ZN1B3fooEv"
+// CHECK-DAG: name = "C::foo()", mangled = "_ZN1C3fooEv"
+
+struct A {
+ void foo();
+};
+void A::foo() {}
+
+class B {
+ void foo();
+};
+void B::foo() {}
+
+union C {
+ void foo();
+};
+void C::foo() {}
+
+extern "C" void _start() {}
OpenPOWER on IntegriCloud