4 // RUN: %clang_cl --target=x86_64-windows-msvc -Od -Z7 -c /GR- /Fo%t.obj -- %s
5 // RUN: lld-link -debug:full -nodefaultlib -entry:main %t.obj -out:%t.exe -pdb:%t.pdb
7 // RUN: lldb-test symbols --find=function --name=main --function-flags=full %t.exe \
8 // RUN: | FileCheck %s --check-prefix=FIND-MAIN
10 // RUN: lldb-test symbols --find=function --name=static_fn --function-flags=full %t.exe \
11 // RUN: | FileCheck %s --check-prefix=FIND-STATIC
13 // RUN: lldb-test symbols --find=function --name=varargs_fn --function-flags=full %t.exe \
14 // RUN: | FileCheck %s --check-prefix=FIND-VAR
16 // RUN: lldb-test symbols --find=function --name=Struct::simple_method --function-flags=full %t.exe \
17 // RUN: | FileCheck %s --check-prefix=FIND-SIMPLE
19 // RUN: lldb-test symbols --find=function --name=Struct::virtual_method --function-flags=full %t.exe \
20 // RUN: | FileCheck %s --check-prefix=FIND-VIRTUAL
22 // RUN: lldb-test symbols --find=function --name=Struct::static_method --function-flags=full %t.exe \
23 // RUN: | FileCheck %s --check-prefix=FIND-STATIC-METHOD
25 // RUN: lldb-test symbols --find=function --name=Struct::overloaded_method --function-flags=full %t.exe \
26 // RUN: | FileCheck %s --check-prefix=FIND-OVERLOAD
33 virtual int virtual_method() {
37 static int static_method() {
41 int overloaded_method() {
42 return 4 + overloaded_method('a') + overloaded_method('a', 1);
45 virtual int overloaded_method(char c
) {
49 static int overloaded_method(char c
, int i
, ...) {
56 static int static_fn() {
60 int varargs_fn(int x
, int y
, ...) {
64 int main(int argc
, char **argv
) {
65 return static_fn() + varargs_fn(argc
, argc
) + s
.simple_method() +
66 Struct::static_method() + s
.virtual_method() + s
.overloaded_method();
69 // FIND-MAIN: Function: id = {{.*}}, name = "main"
70 // FIND-MAIN-NEXT: FuncType: id = {{.*}}, compiler_type = "int (int, char **)"
72 // FIND-STATIC: Function: id = {{.*}}, name = "{{.*}}static_fn{{.*}}"
73 // FIND-STATIC-NEXT: FuncType: id = {{.*}}, compiler_type = "int (void)"
75 // FIND-VAR: Function: id = {{.*}}, name = "{{.*}}varargs_fn{{.*}}"
76 // FIND-VAR-NEXT: FuncType: id = {{.*}}, compiler_type = "int (int, int, ...)"
78 // FIND-SIMPLE: Function: id = {{.*}}, name = "{{.*}}Struct::simple_method{{.*}}"
79 // FIND-SIMPLE-NEXT: FuncType: id = {{.*}}, compiler_type = "int (void)"
81 // FIND-VIRTUAL: Function: id = {{.*}}, name = "{{.*}}Struct::virtual_method{{.*}}"
82 // FIND-VIRTUAL-NEXT: FuncType: id = {{.*}}, compiler_type = "int (void)"
84 // FIND-STATIC-METHOD: Function: id = {{.*}}, name = "{{.*}}Struct::static_method{{.*}}"
85 // FIND-STATIC-METHOD-NEXT: FuncType: id = {{.*}}, compiler_type = "int (void)"
87 // FIND-OVERLOAD: Function: id = {{.*}}, name = "{{.*}}Struct::overloaded_method{{.*}}"
88 // FIND-OVERLOAD: FuncType: id = {{.*}}, compiler_type = "int (void)"
89 // FIND-OVERLOAD: FuncType: id = {{.*}}, compiler_type = "int (char)"
90 // FIND-OVERLOAD: FuncType: id = {{.*}}, compiler_type = "int (char, int, ...)"