]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - lit/SymbolFile/PDB/func-symbols.test
Vendor import of lldb trunk r338150:
[FreeBSD/FreeBSD.git] / lit / SymbolFile / PDB / func-symbols.test
1 REQUIRES: windows
2 RUN: clang-cl -m32 /Z7 /c /GS- %S/Inputs/FuncSymbolsTestMain.cpp /o %T/FuncSymbolsTestMain.cpp.obj
3 RUN: clang-cl -m32 /Z7 /c /GS- %S/Inputs/FuncSymbols.cpp /o %T/FuncSymbols.cpp.obj
4 RUN: link %T/FuncSymbolsTestMain.cpp.obj %T/FuncSymbols.cpp.obj /DEBUG /nodefaultlib /Entry:main /OUT:%T/FuncSymbolsTest.exe
5 RUN: lldb-test symbols %T/FuncSymbolsTest.exe | FileCheck --check-prefix=CHECK-ONE %s
6 RUN: lldb-test symbols %T/FuncSymbolsTest.exe | FileCheck --check-prefix=CHECK-TWO %s
7
8 ; Link multiple objects
9 ; In this test, We don't check demangled name of a mangled function.
10
11 CHECK-ONE: Module [[MD:.*]]
12 CHECK-ONE-DAG: {{.*}}: SymbolVendor ([[MD]])
13 CHECK-ONE-DAG: [[TY0:.*]]:   Type{[[UID0:.*]]} , name = "Func_arg_array", decl = FuncSymbolsTestMain.cpp:3, compiler_type = {{.*}} int (int *)
14 CHECK-ONE-DAG: [[TY1:.*]]:   Type{[[UID1:.*]]} , name = "Func_arg_void", decl = FuncSymbolsTestMain.cpp:4, compiler_type = {{.*}} void (void)
15 CHECK-ONE-DAG: [[TY2:.*]]:   Type{[[UID2:.*]]} , name = "Func_arg_none", decl = FuncSymbolsTestMain.cpp:5, compiler_type = {{.*}} void (void)
16 CHECK-ONE-DAG: [[TY3:.*]]:   Type{[[UID3:.*]]} , name = "Func_varargs", decl = FuncSymbolsTestMain.cpp:6, compiler_type = {{.*}} void (...)
17 CHECK-ONE-DAG: [[TY4:.*]]:   Type{[[UID4:.*]]} , name = "NS::Func", decl = FuncSymbolsTestMain.cpp:28, compiler_type = {{.*}} void (signed char, int)
18 CHECK-ONE-DAG: [[TY5:.*]]:   Type{[[UID5:.*]]} , name = "main", decl = FuncSymbolsTestMain.cpp:44, compiler_type = {{.*}} int (void)
19 CHECK-ONE-DAG: [[TY6:.*]]:   Type{[[UID6:.*]]} , name = "`anonymous namespace'::Func", decl = FuncSymbolsTestMain.cpp:24, compiler_type = {{.*}} void (int, const long, volatile _Bool, ...)
20 CHECK-ONE-DAG: [[TY7:.*]]:   Type{[[UID7:.*]]} , name = "StaticFunction", decl = FuncSymbolsTestMain.cpp:35, compiler_type = {{.*}} long (int)
21 CHECK-ONE-DAG: [[TY8:.*]]:   Type{[[UID8:.*]]} , name = "MemberTest::A::Func", decl = FuncSymbolsTestMain.cpp:12, compiler_type = {{.*}} int (int, ...)
22 CHECK-ONE-DAG: [[TY9:.*]]:   Type{[[UID9:.*]]} , name = "TemplateFunc<1,int>", decl = FuncSymbolsTestMain.cpp:18, compiler_type = {{.*}} void (int)
23 CHECK-ONE-DAG: [[TY10:.*]]:   Type{[[UID10:.*]]} , name = "TemplateFunc<1,int,int,int>", decl = FuncSymbolsTestMain.cpp:18, compiler_type = {{.*}} void (int, int, int)
24 CHECK-ONE-DAG: [[TY11:.*]]:   Type{[[UID11:.*]]} , name = "InlinedFunction", decl = FuncSymbolsTestMain.cpp:40, compiler_type = {{.*}} void (long)
25
26 CHECK-ONE: {{.*}}:   CompileUnit{{.*}}, language = "c++", file = '{{.*}}\FuncSymbolsTestMain.cpp'
27 CHECK-ONE-DAG: Function{[[UID0]]}, mangled = ?Func_arg_array@@YAHQAH@Z, demangled = {{.*}}, type = [[TY0]]
28 CHECK-ONE-DAG: Function{[[UID1]]}, mangled = ?Func_arg_void@@YAXXZ, demangled = {{.*}}, type = [[TY1]]
29 CHECK-ONE-DAG: Function{[[UID2]]}, mangled = ?Func_arg_none@@YAXXZ, demangled = {{.*}}, type = [[TY2]]
30 CHECK-ONE-DAG: Function{[[UID3]]}, mangled = ?Func_varargs@@YAXZZ, demangled = {{.*}}, type = [[TY3]]
31 CHECK-ONE-DAG: Function{[[UID4]]}, mangled = ?Func@NS@@YAXDH@Z, demangled = {{.*}}, type = [[TY4]]
32 CHECK-ONE-DAG: Function{[[UID5]]}, mangled = _main, demangled = {{.*}}, type = [[TY5]]
33 CHECK-ONE-DAG: Function{[[UID6]]}, demangled = {{.*}}`anonymous namespace'::Func{{.*}}, type = [[TY6]]
34 CHECK-ONE-DAG: Function{[[UID7]]}, demangled = {{.*}}StaticFunction{{.*}}, type = [[TY7]]
35 CHECK-ONE-DAG: Function{[[UID8]]}, mangled = ?Func@A@MemberTest@@QAAHHZZ, demangled = {{.*}}, type = [[TY8]]
36 CHECK-ONE-DAG: Function{[[UID9]]}, mangled = ??$TemplateFunc@$00H@@YAXH@Z, demangled = {{.*}}, type = [[TY9]]
37 CHECK-ONE-DAG: Function{[[UID10]]}, mangled = ??$TemplateFunc@$00HHH@@YAXHHH@Z, demangled = {{.*}}, type = [[TY10]]
38 CHECK-ONE-DAG: Function{[[UID11]]}, mangled = ?InlinedFunction@@YAXJ@Z, demangled = {{.*}}, type = [[TY11]]
39
40 ; We expect new types observed in another compile unit
41 CHECK-TWO-DAG: [[TY30:.*]]:   Type{[[UID30:.*]]} , name = "FunctionCall", decl = FuncSymbols.cpp:13, compiler_type = {{.*}} void (void)
42 CHECK-TWO-DAG: [[TY31:.*]]:   Type{[[UID31:.*]]} , name = "`anonymous namespace'::StaticFunction", decl = FuncSymbols.cpp:4, compiler_type = {{.*}} long (int)
43 CHECK-TWO-DAG: [[TY32:.*]]:   Type{[[UID32:.*]]} , name = "InlinedFunction", decl = FuncSymbols.cpp:10, compiler_type = {{.*}} int (long)
44
45 CHECK-TWO: {{.*}}:   CompileUnit{{.*}}, language = "c++", file = '{{.*}}\FuncSymbols.cpp'
46 CHECK-TWO-DAG: Function{[[UID30]]}, mangled = ?FunctionCall@@YAXXZ, demangled = {{.*}}, type = [[TY30]]
47 CHECK-TWO-DAG: Function{[[UID31]]}, demangled = {{.*}}`anonymous namespace'::StaticFunction{{.*}}, type = [[TY31]]
48 CHECK-TWO-DAG: Function{[[UID32]]}, demangled = {{.*}}InlinedFunction{{.*}}, type = [[TY32]]