1 REQUIRES: system-windows, msvc
2 RUN: %build --compiler=clang-cl --mode=compile --arch=64 --nodefaultlib --output=%T/VariablesTest.cpp.obj %S/Inputs/VariablesTest.cpp
3 RUN: %build --compiler=msvc --mode=link --arch=64 --nodefaultlib --output=%T/VariablesTest.cpp.exe %T/VariablesTest.cpp.obj
4 RUN: lldb-test symbols %T/VariablesTest.cpp.exe > %T/VariablesTest.out
5 RUN: FileCheck --check-prefix=GLOBALS --input-file=%T/VariablesTest.out %s
6 RUN: FileCheck --check-prefix=FUNC-F --input-file=%T/VariablesTest.out %s
7 RUN: FileCheck --check-prefix=FUNC-MAIN --input-file=%T/VariablesTest.out %s
8 RUN: FileCheck --check-prefix=FUNC-CONSTRUCTOR --input-file=%T/VariablesTest.out %s
9 RUN: FileCheck --check-prefix=FUNC-MEMBER --input-file=%T/VariablesTest.out %s
11 GLOBALS: Module [[MOD:.*]]
12 GLOBALS: SymbolFile pdb ([[MOD]])
13 GLOBALS: CompileUnit{{.*}}, language = "c++", file = '{{.*}}\VariablesTest.cpp'
14 GLOBALS-DAG: Variable{{.*}}, name = "g_IntVar"
15 GLOBALS-SAME: scope = global, location = {{.*}}, external
16 GLOBALS-DAG: Variable{{.*}}, name = "g_pConst"
17 GLOBALS-SAME: scope = global, location = {{.*}}, external
18 GLOBALS-DAG: Variable{{.*}}, name = "same_name_var"
19 GLOBALS-SAME: scope = global, location = {{.*}}, external
20 GLOBALS-DAG: Variable{{.*}}, name = "Class::m_StaticClassMember"
21 GLOBALS-SAME: scope = global, location = {{.*}}, external
22 GLOBALS-DAG: Variable{{.*}}, name = "g_EnumVar"
23 GLOBALS-SAME: scope = global, location = {{.*}}, external
24 GLOBALS-DAG: Variable{{.*}}, name = "g_tls"
25 GLOBALS-SAME: scope = thread local, location = {{.*}}, external
26 GLOBALS-DAG: Variable{{.*}}, name = "ClassVar"
27 GLOBALS-SAME: scope = global, location = {{.*}}, external
28 GLOBALS-DAG: Variable{{.*}}, name = "g_Const"
29 GLOBALS-SAME: scope = ??? (2)
32 FUNC-F: Function{{.*}}, mangled = ?f@@YAHHH@Z
34 FUNC-F-NEXT: Variable{{.*}}, name = "var_arg1"
35 FUNC-F-SAME: scope = parameter
36 FUNC-F-NEXT: Variable{{.*}}, name = "var_arg2"
37 FUNC-F-SAME: scope = parameter
38 FUNC-F-NEXT: Variable{{.*}}, name = "same_name_var"
39 FUNC-F-SAME: scope = local
41 FUNC-MAIN: Function{{.*}}, mangled = main
43 FUNC-MAIN-NEXT: Variable{{.*}}, name = "same_name_var"
44 FUNC-MAIN-SAME: scope = local
45 FUNC-MAIN-NEXT: Variable{{.*}}, name = "local_const"
46 FUNC-MAIN-SAME: scope = local
47 FUNC-MAIN-NEXT: Variable{{.*}}, name = "local_CString"
48 FUNC-MAIN-SAME: scope = local
49 FUNC-MAIN-NEXT: Variable{{.*}}, name = "local_pCString"
50 FUNC-MAIN-SAME: scope = local
51 FUNC-MAIN-NEXT: Variable{{.*}}, name = "a"
52 FUNC-MAIN-SAME: scope = local
54 FUNC-CONSTRUCTOR: Function{{.*}}, {{(de)?}}mangled = {{.*}}{{(Class::)?}}Class{{.*}}
55 FUNC-CONSTRUCTOR-NEXT: Block
56 FUNC-CONSTRUCTOR-NEXT: Variable{{.*}}, name = "this"
57 FUNC-CONSTRUCTOR-SAME: scope = parameter
58 FUNC-CONSTRUCTOR-SAME: artificial
59 FUNC-CONSTRUCTOR-NEXT: Variable{{.*}}, name = "a"
60 FUNC-CONSTRUCTOR-SAME: scope = parameter
62 FUNC-MEMBER: Function{{.*}}, {{(de)?}}mangled = {{.*}}{{(Class::)?}}Func{{.*}}
63 FUNC-MEMBER-NEXT: Block
64 FUNC-MEMBER-NEXT: Variable{{.*}}, name = "this"
65 FUNC-MEMBER-SAME: scope = parameter
66 FUNC-MEMBER-SAME: artificial