diff options
Diffstat (limited to 'test/CodeGenCXX/virt.cpp')
-rw-r--r-- | test/CodeGenCXX/virt.cpp | 119 |
1 files changed, 119 insertions, 0 deletions
diff --git a/test/CodeGenCXX/virt.cpp b/test/CodeGenCXX/virt.cpp index 9ae81e5..21fecac 100644 --- a/test/CodeGenCXX/virt.cpp +++ b/test/CodeGenCXX/virt.cpp @@ -930,6 +930,124 @@ struct test15_D : test15_NV1, virtual test15_B2 { // CHECK-LP32-NEXT: .long __ZN8test15_B4foo3Ev +struct test16_NV1 { + virtual void fooNV1() { } +virtual void foo_NV1() { } + int i; +}; + +struct test16_NV2 { + virtual test16_NV2* foo1() { return 0; } +virtual void foo_NV2() { } +virtual void foo_NV2b() { } + int i; +}; + +struct test16_B : public test16_NV1, test16_NV2 { + virtual test16_B *foo1() { return 0; } + virtual test16_B *foo2() { return 0; } + virtual test16_B *foo3() { return 0; } +virtual void foo_B() { } + int i; +}; + +struct test16_B2 : test16_NV1, virtual test16_B { + virtual test16_B2 *foo1() { return 0; } + virtual test16_B2 *foo2() { return 0; } +virtual void foo_B2() { } + int i; +}; + +struct test16_D : test16_NV1, virtual test16_B2 { + virtual test16_D *foo1() { return 0; } +}; + +// CHECK-LP64: __ZTV8test16_D: +// CHECK-LP64-NEXT: .quad 32 +// CHECK-LP64-NEXT: .quad 16 +// CHECK-LP64-NEXT: .space 8 +// CHECK-LP64-NEXT: .quad __ZTI8test16_D +// CHECK-LP64-NEXT: .quad __ZN10test16_NV16fooNV1Ev +// CHECK-LP64-NEXT: .quad __ZN10test16_NV17foo_NV1Ev +// CHECK-LP64-NEXT: .quad __ZN8test16_D4foo1Ev +// CHECK-LP64-NEXT: .space 8 +// CHECK-LP64-NEXT: .space 8 +// CHECK-LP64-NEXT: .quad 18446744073709551600 +// CHECK-LP64-NEXT: .space 8 +// CHECK-LP64-NEXT: .space 8 +// CHECK-LP64-NEXT: .quad 16 +// CHECK-LP64-NEXT: .quad 18446744073709551600 +// CHECK-LP64-NEXT: .quad __ZTI8test16_D +// CHECK-LP64-NEXT: .quad __ZN10test16_NV16fooNV1Ev +// CHECK-LP64-NEXT: .quad __ZN10test16_NV17foo_NV1Ev +// CHECK-LP64-NEXT: .quad __ZTcv0_n48_v0_n24_N8test16_D4foo1Ev +// CHECK-LP64-NEXT: .quad __ZN9test16_B24foo2Ev +// CHECK-LP64-NEXT: .quad __ZN9test16_B26foo_B2Ev +// CHECK-LP64-NEXT .quad 16 +// CHECK-LP64-NEXT .quad 16 +// CHECK-LP64-NEXT: .space 8 +// CHECK-LP64-NEXT: .space 8 +// CHECK-LP64: .quad 18446744073709551600 +// CHECK-LP64: .quad 18446744073709551584 +// CHECK-LP64-NEXT: .space 8 +// CHECK-LP64-NEXT: .space 8 +// CHECK-LP64-NEXT: .quad 18446744073709551584 +// CHECK-LP64-NEXT: .quad __ZTI8test16_D +// CHECK-LP64-NEXT: .quad __ZN10test16_NV16fooNV1Ev +// CHECK-LP64-NEXT: .quad __ZN10test16_NV17foo_NV1Ev +// CHECK-LP64-NEXT: .quad __ZTcv0_n40_v0_n32_N8test16_D4foo1Ev +// CHECK-LP64-NEXT: .quad __ZTcv0_n48_v0_n24_N9test16_B24foo2Ev +// CHECK-LP64-NEXT: .quad __ZN8test16_B4foo3Ev +// CHECK-LP64-NEXT: .quad __ZN8test16_B5foo_BEv +// CHECK-LP64-NEXT: .quad 18446744073709551568 +// CHECK-LP64-NEXT: .quad __ZTI8test16_D +// CHECK-LP64-NEXT .quad __ZTcvn16_n40_v16_n32_N8test16_D4foo1Ev +// CHECK-LP64: .quad __ZN10test16_NV27foo_NV2Ev +// CHECK-LP64-NEXT: .quad __ZN10test16_NV28foo_NV2bEv + +// CHECK-LP32: __ZTV8test16_D: +// CHECK-LP32-NEXT: .long 20 +// CHECK-LP32-NEXT: .long 8 +// CHECK-LP32-NEXT: .space 4 +// CHECK-LP32-NEXT: .long __ZTI8test16_D +// CHECK-LP32-NEXT: .long __ZN10test16_NV16fooNV1Ev +// CHECK-LP32-NEXT: .long __ZN10test16_NV17foo_NV1Ev +// CHECK-LP32-NEXT: .long __ZN8test16_D4foo1Ev +// CHECK-LP32-NEXT: .space 4 +// CHECK-LP32-NEXT: .space 4 +// CHECK-LP32-NEXT: .long 4294967288 +// CHECK-LP32-NEXT: .space 4 +// CHECK-LP32-NEXT: .space 4 +// CHECK-LP32-NEXT: .long 12 +// CHECK-LP32-NEXT: .long 4294967288 +// CHECK-LP32-NEXT: .long __ZTI8test16_D +// CHECK-LP32-NEXT: .long __ZN10test16_NV16fooNV1Ev +// CHECK-LP32-NEXT: .long __ZN10test16_NV17foo_NV1Ev +// CHECK-LP32-NEXT: .long __ZTcv0_n24_v0_n12_N8test16_D4foo1Ev +// CHECK-LP32-NEXT: .long __ZN9test16_B24foo2Ev +// CHECK-LP32-NEXT: .long __ZN9test16_B26foo_B2Ev +// CHECK-LP32-NEXT .long 8 +// CHECK-LP32-NEXT .long 8 +// CHECK-LP32-NEXT: .space 4 +// CHECK-LP32-NEXT: .space 4 +// CHECK-LP32: .long 4294967284 +// CHECK-LP32-NEXT: .long 4294967276 +// CHECK-LP32-NEXT: .space 4 +// CHECK-LP32-NEXT: .space 4 +// CHECK-LP32-NEXT: .long 4294967276 +// CHECK-LP32-NEXT: .long __ZTI8test16_D +// CHECK-LP32-NEXT: .long __ZN10test16_NV16fooNV1Ev +// CHECK-LP32-NEXT: .long __ZN10test16_NV17foo_NV1Ev +// CHECK-LP32-NEXT: .long __ZTcv0_n20_v0_n16_N8test16_D4foo1Ev +// CHECK-LP32-NEXT: .long __ZTcv0_n24_v0_n12_N9test16_B24foo2Ev +// CHECK-LP32-NEXT: .long __ZN8test16_B4foo3Ev +// CHECK-LP32-NEXT: .long __ZN8test16_B5foo_BEv +// CHECK-LP32-NEXT: .long 4294967268 +// CHECK-LP32-NEXT: .long __ZTI8test16_D +// CHECK-LP32-NEXT .long __ZTcvn8_n20_v8_n16_N8test16_D4foo1Ev +// CHECK-LP32: .long __ZN10test16_NV27foo_NV2Ev +// CHECK-LP32-NEXT: .long __ZN10test16_NV28foo_NV2bEv + // CHECK-LP64: __ZTV1B: // CHECK-LP64-NEXT: .space 8 @@ -1009,6 +1127,7 @@ struct test15_D : test15_NV1, virtual test15_B2 { // CHECK-LP64-NEXT: .quad __ZN2D14bar4Ev // CHECK-LP64-NEXT: .quad __ZN2D14bar5Ev +test16_D d16; test15_D d15; test13_D d13; test11_D d11; |