1// clang-format off
2
3// RUN: %build -o %t.exe -- %s
4// RUN: env LLDB_USE_NATIVE_PDB_READER=1 %lldb -f %t.exe -s \
5// RUN: %p/Inputs/lookup-by-types.lldbinit 2>&1 | FileCheck %s
6
7class B;
8class A {
9public:
10 static const A constA;
11 static A a;
12 static B b;
13 int val = 1;
14};
15class B {
16public:
17 static A a;
18 int val = 2;
19};
20A varA;
21B varB;
22const A A::constA = varA;
23A A::a = varA;
24B A::b = varB;
25A B::a = varA;
26
27int main(int argc, char **argv) {
28 return varA.val + varB.val;
29}
30
31// CHECK: image lookup -type A
32// CHECK-NEXT: 1 match found in {{.*}}.exe
33// CHECK-NEXT: compiler_type = "class A {
34// CHECK-NEXT: static const A constA;
35// CHECK-NEXT: static A a;
36// CHECK-NEXT: static B b;
37// CHECK-NEXT: public:
38// CHECK-NEXT: int val;
39// CHECK-NEXT: }"
40// CHECK: image lookup -type B
41// CHECK-NEXT: 1 match found in {{.*}}.exe
42// CHECK-NEXT: compiler_type = "class B {
43// CHECK-NEXT: static A a;
44// CHECK-NEXT: public:
45// CHECK-NEXT: int val;
46// CHECK-NEXT: }"
47

source code of lldb/test/Shell/SymbolFile/NativePDB/lookup-by-types.cpp