xref: /llvm-project/llvm/test/tools/llvm-pdbutil/Inputs/ComplexPaddingTest.cpp (revision c9c55cf89b0d4ddd4b778da8ecf59fe740283bec)
1 // Compile with "cl /c /Zi /GR- ComplexPaddingTest.cpp"
2 // Link with "link ComplexPaddingTest.obj /debug /nodefaultlib /entry:main"
3 
4 #include <stdint.h>
5 
6 extern "C" using at_exit_handler = void();
7 
atexit(at_exit_handler handler)8 int atexit(at_exit_handler handler) { return 0; }
9 
10 struct TestVB {
operator deleteTestVB11   static void operator delete(void *ptr, size_t sz) {}
~TestVBTestVB12   virtual ~TestVB() {}
IntroFunction1TestVB13   virtual void IntroFunction1() {}
14   int X;
15 } A;
16 
17 struct TestNVB {
operator deleteTestNVB18   static void operator delete(void *ptr, size_t sz) {}
~TestNVBTestNVB19   virtual ~TestNVB() {}
IntroFunction2TestNVB20   virtual void IntroFunction2() {}
21   int Y;
22 } B;
23 
24 struct TestVBLayout
25     : public virtual TestVB,
26       public TestNVB {
operator deleteTestVBLayout27   static void operator delete(void *ptr, size_t sz) {}
28   int Z;
29 } C;
30 
31 struct TestIVBBase : public virtual TestVB {
32   int A;
33 } D;
34 
35 struct TestIVBDerived : public TestIVBBase {
36   int B;
37 } E;
38 
39 struct TestIVBMergedDerived
40     : public virtual TestVB,
41       public TestIVBBase {
42   int B;
43 } F;
44 
main(int argc,char ** argv)45 int main(int argc, char **argv) {
46 
47   return 0;
48 }
49