[libc] Deprecate LLVM_ENABLE_PROJECTS in favor of LLVM_ENABLE_RUNTIMES. (#117265)
[llvm-project.git] / llvm / test / tools / llvm-pdbutil / Inputs / ClassLayoutTest.cpp
blob00565970cac0d4ae2e608372cceee5c5c622d39e
1 // Compile with "cl /c /Zi /GR- ClassLayoutTest.cpp"
2 // Link with "link ClassLayoutTest.obj /debug /nodefaultlib /entry:main"
4 namespace MembersTest {
5 class A {
6 public:
7 typedef int NestedTypedef;
8 enum NestedEnum {
9 NestedEnumValue1
12 void MemberFunc() {}
14 private:
15 int IntMemberVar;
16 double DoubleMemberVar;
20 namespace GlobalsTest {
21 int IntVar;
22 double DoubleVar;
24 typedef int Typedef;
25 enum Enum {
26 Val1
27 } EnumVar;
28 Typedef TypedefVar;
31 namespace BaseClassTest {
32 class A {};
33 class B : public virtual A {};
34 class C : public virtual A {};
35 class D : protected B, private C {};
38 namespace UdtKindTest {
39 struct A {};
40 class B {};
41 union C {};
44 namespace BitFieldTest {
45 struct A {
46 int Bits1 : 1;
47 int Bits2 : 2;
48 int Bits3 : 3;
49 int Bits4 : 4;
50 int Bits22 : 22;
51 int Offset0x04;
55 int main(int argc, char **argv) {
56 MembersTest::A v1;
57 v1.MemberFunc();
58 BaseClassTest::D v2;
59 UdtKindTest::A v3;
60 UdtKindTest::B v4;
61 UdtKindTest::C v5;
62 BitFieldTest::A v7;
63 return 0;