1 // clang-format off
2 // REQUIRES: lld, x86
3 
4 // RUN: %clang_cl --target=x86_64-windows-msvc -Od -Z7 -c /Fo%t.obj -- %s
5 // RUN: lld-link -debug:full -nodefaultlib -entry:main %t.obj -out:%t.exe -pdb:%t.pdb
6 
7 // RUN: lldb-test symbols --find=function --name=main --function-flags=full %t.exe \
8 // RUN:     | FileCheck %s --check-prefix=FIND-MAIN
9 
10 // RUN: lldb-test symbols --find=function --name=static_fn --function-flags=full %t.exe \
11 // RUN:     | FileCheck %s --check-prefix=FIND-STATIC
12 
13 // RUN: lldb-test symbols --find=function --name=varargs_fn --function-flags=full %t.exe \
14 // RUN:     | FileCheck %s --check-prefix=FIND-VAR
15 
16 static int static_fn() {
17   return 42;
18 }
19 
20 int varargs_fn(int x, int y, ...) {
21   return x + y;
22 }
23 
24 int main(int argc, char **argv) {
25   return static_fn() + varargs_fn(argc, argc);
26 }
27 
28 // FIND-MAIN:      Function: id = {{.*}}, name = "main"
29 // FIND-MAIN-NEXT: FuncType: id = {{.*}}, byte-size = 0, compiler_type = "int (int, char **)"
30 
31 // FIND-STATIC:      Function: id = {{.*}}, name = "static_fn"
32 // FIND-STATIC-NEXT: FuncType: id = {{.*}}, byte-size = 0, compiler_type = "int (void)"
33 
34 // FIND-VAR:      Function: id = {{.*}}, name = "varargs_fn"
35 // FIND-VAR-NEXT: FuncType: id = {{.*}}, byte-size = 0, compiler_type = "int (int, int, ...)"
36