1 REQUIRES: system-windows, msvc
2 RUN: %build --compiler=clang-cl --mode=compile --arch=32 --nodefaultlib --output=%T/ClassLayoutTest.cpp.obj %S/Inputs/ClassLayoutTest.cpp
3 RUN: %build --compiler=msvc --mode=link --arch=32 --nodefaultlib --output=%T/ClassLayoutTest.cpp.exe %T/ClassLayoutTest.cpp.obj
4 RUN: lldb-test symbols %T/ClassLayoutTest.cpp.exe | FileCheck %s
5 RUN: lldb-test symbols %T/ClassLayoutTest.cpp.exe | FileCheck --check-prefix=ENUM %s
6 RUN: lldb-test symbols %T/ClassLayoutTest.cpp.exe | FileCheck --check-prefix=UNION %s
7 RUN: lldb-test symbols %T/ClassLayoutTest.cpp.exe | FileCheck --check-prefix=STRUCT %s
8 RUN: lldb-test symbols %T/ClassLayoutTest.cpp.exe | FileCheck --check-prefix=COMPLEX %s
9 RUN: lldb-test symbols %T/ClassLayoutTest.cpp.exe | FileCheck --check-prefix=LIST %s
10 RUN: lldb-test symbols %T/ClassLayoutTest.cpp.exe | FileCheck --check-prefix=UNNAMED-STRUCT %s
11 RUN: lldb-test symbols %T/ClassLayoutTest.cpp.exe | FileCheck --check-prefix=BASE %s
12 RUN: lldb-test symbols %T/ClassLayoutTest.cpp.exe | FileCheck --check-prefix=FRIEND %s
13 RUN: lldb-test symbols %T/ClassLayoutTest.cpp.exe | FileCheck --check-prefix=CLASS %s
15 CHECK: Module [[MOD:.*]]
16 CHECK: SymbolFile pdb ([[MOD]])
17 CHECK: {{^[0-9A-F]+}}: CompileUnit{{[{]0x[0-9a-f]+[}]}}, language = "c++", file = '{{.*}}\ClassLayoutTest.cpp'
19 ENUM: name = "Enum", size = 4, decl = ClassLayoutTest.cpp:5
20 ENUM-SAME: enum Enum {
26 UNION: name = "Union", size = 4, decl = ClassLayoutTest.cpp:9
27 UNION-SAME: union Union {
29 UNION: unsigned short Col;
34 STRUCT: name = "Struct", size = 64, decl = ClassLayoutTest.cpp:22
35 STRUCT-SAME: struct Struct {
37 STRUCT: unsigned char UCharVar;
38 STRUCT: unsigned int UIntVar;
39 STRUCT: long long LongLongVar;
41 STRUCT: int array[10];
44 COMPLEX: name = "Complex", size = 368, decl = ClassLayoutTest.cpp:33
45 COMPLEX-SAME: struct Complex {
46 COMPLEX: _List *array[90];
52 LIST: name = "_List", size = 12, decl = ClassLayoutTest.cpp:45
53 LIST-SAME: struct _List {
55 LIST: _List *previous;
59 UNNAMED-STRUCT: name = "UnnamedStruct", size = 4, decl = ClassLayoutTest.cpp:52
60 UNNAMED-STRUCT-SAME: struct UnnamedStruct {
61 UNNAMED-STRUCT: int a;
64 BASE: name = "Base", size = 4, decl = ClassLayoutTest.cpp:59
65 BASE-SAME: class Base {
72 FRIEND: name = "Friend", size = 1, decl = ClassLayoutTest.cpp:70
73 FRIEND-SAME: class Friend {
77 CLASS: name = "Class", size = 88, decl = ClassLayoutTest.cpp:74
78 CLASS-SAME: class Class : public MemberTest::Base {
79 CLASS: static int m_static;
81 CLASS: Struct m_struct;
84 CLASS: int m_protected;
88 CLASS: {{(static )?}}int {{.*}}StaticMemberFunc(int, ...);
90 CLASS: int f(MemberTest::Friend);
91 CLASS: bool operator==(const MemberTest::Class &)