diff options
| author | Timur Iskhodzhanov <timurrrr@google.com> | 2014-03-07 09:34:59 +0000 |
|---|---|---|
| committer | Timur Iskhodzhanov <timurrrr@google.com> | 2014-03-07 09:34:59 +0000 |
| commit | a895758203b07ee6b58ed7343e337719125d8c48 (patch) | |
| tree | f10d9a401a6f4344cf791276943729d2b9941ea3 /clang/test/CodeGenCXX/microsoft-abi-vtables-return-thunks.cpp | |
| parent | c536a5dba0a2e2c3cb41831f443a21da329d34ca (diff) | |
| download | bcm5719-llvm-a895758203b07ee6b58ed7343e337719125d8c48.tar.gz bcm5719-llvm-a895758203b07ee6b58ed7343e337719125d8c48.zip | |
Fix PR18967 -- Bad this adjustment for virtual methods in a diamond virtual inheritance hierarchy
llvm-svn: 203222
Diffstat (limited to 'clang/test/CodeGenCXX/microsoft-abi-vtables-return-thunks.cpp')
| -rw-r--r-- | clang/test/CodeGenCXX/microsoft-abi-vtables-return-thunks.cpp | 42 |
1 files changed, 22 insertions, 20 deletions
diff --git a/clang/test/CodeGenCXX/microsoft-abi-vtables-return-thunks.cpp b/clang/test/CodeGenCXX/microsoft-abi-vtables-return-thunks.cpp index 7812b58bde6..a4a21106c68 100644 --- a/clang/test/CodeGenCXX/microsoft-abi-vtables-return-thunks.cpp +++ b/clang/test/CodeGenCXX/microsoft-abi-vtables-return-thunks.cpp @@ -20,25 +20,27 @@ struct K : J { virtual E *foo(); K(); }; J::J() {} // VFTABLES-LABEL: VFTable for 'test1::H' in 'test1::I' in 'test1::J' (3 entries). -// VFTABLES: 0 | test1::D *test1::J::foo() -// VFTABLES: [return adjustment: 4 non-virtual] -// VFTABLES: 1 | test1::D *test1::J::foo() -// VFTABLES: 2 | test1::D *test1::J::foo() +// VFTABLES-NEXT: 0 | test1::D *test1::J::foo() +// VFTABLES-NEXT: [return adjustment (to type 'struct test1::B *'): 4 non-virtual] +// VFTABLES-NEXT: 1 | test1::D *test1::J::foo() +// VFTABLES-NEXT: [return adjustment (to type 'struct test1::C *'): 0 non-virtual] +// VFTABLES-NEXT: 2 | test1::D *test1::J::foo() // GLOBALS-LABEL: @"\01??_7J@test1@@6B@" = linkonce_odr unnamed_addr constant [3 x i8*] // GLOBALS: @"\01?foo@J@test1@@QAEPAUB@2@XZ" // GLOBALS: @"\01?foo@J@test1@@QAEPAUC@2@XZ" -// GLOBALS: @"\01?foo@J@test1@@QAEPAUD@2@XZ" -// FIXME: Should be UAEPAUD. +// GLOBALS: @"\01?foo@J@test1@@UAEPAUD@2@XZ" K::K() {} // VFTABLES-LABEL: VFTable for 'test1::H' in 'test1::I' in 'test1::J' in 'test1::K' (4 entries). -// VFTABLES: 0 | test1::E *test1::K::foo() -// VFTABLES: [return adjustment: 4 non-virtual] -// VFTABLES: 1 | test1::E *test1::K::foo() -// VFTABLES: 2 | test1::E *test1::K::foo() -// VFTABLES: 3 | test1::E *test1::K::foo() +// VFTABLES-NEXT: 0 | test1::E *test1::K::foo() +// VFTABLES-NEXT: [return adjustment (to type 'struct test1::B *'): 4 non-virtual] +// VFTABLES-NEXT: 1 | test1::E *test1::K::foo() +// VFTABLES-NEXT: [return adjustment (to type 'struct test1::C *'): 0 non-virtual] +// VFTABLES-NEXT: 2 | test1::E *test1::K::foo() +// VFTABLES-NEXT: [return adjustment (to type 'struct test1::D *'): 0 non-virtual] +// VFTABLES-NEXT: 3 | test1::E *test1::K::foo() // Only B to C requires adjustment, but we get 3 thunks in K's vftable, two of // which are trivial. @@ -46,8 +48,7 @@ K::K() {} // GLOBALS: @"\01?foo@K@test1@@QAEPAUB@2@XZ" // GLOBALS: @"\01?foo@K@test1@@QAEPAUC@2@XZ" // GLOBALS: @"\01?foo@K@test1@@QAEPAUD@2@XZ" -// GLOBALS: @"\01?foo@K@test1@@QAEPAUE@2@XZ" -// FIXME: Should be UAEPAUE. +// GLOBALS: @"\01?foo@K@test1@@UAEPAUE@2@XZ" // This thunk has a return adjustment. // CODEGEN-LABEL: define {{.*}} @"\01?foo@K@test1@@QAEPAUB@2@XZ" @@ -85,19 +86,20 @@ struct K : J { virtual E *foo(); K(); }; J::J() {} // VFTABLES-LABEL: VFTable for 'test2::H' in 'test2::I' in 'test2::J' (2 entries). -// VFTABLES: 0 | test2::D *test2::J::foo() -// VFTABLES: [return adjustment: 4 non-virtual] -// VFTABLES: 1 | test2::D *test2::J::foo() +// VFTABLES-NEXT: 0 | test2::D *test2::J::foo() +// VFTABLES-NEXT: [return adjustment (to type 'struct test2::B *'): 4 non-virtual] +// VFTABLES-NEXT: 1 | test2::D *test2::J::foo() // GLOBALS-LABEL: @"\01??_7J@test2@@6B@" = linkonce_odr unnamed_addr constant [2 x i8*] K::K() {} // VFTABLES-LABEL: VFTable for 'test2::H' in 'test2::I' in 'test2::J' in 'test2::K' (3 entries). -// VFTABLES: 0 | test2::E *test2::K::foo() -// VFTABLES: [return adjustment: 4 non-virtual] -// VFTABLES: 1 | test2::E *test2::K::foo() -// VFTABLES: 2 | test2::E *test2::K::foo() +// VFTABLES-NEXT: 0 | test2::E *test2::K::foo() +// VFTABLES-NEXT: [return adjustment (to type 'struct test2::B *'): 4 non-virtual] +// VFTABLES-NEXT: 1 | test2::E *test2::K::foo() +// VFTABLES-NEXT: [return adjustment (to type 'struct test2::D *'): 0 non-virtual] +// VFTABLES-NEXT: 2 | test2::E *test2::K::foo() // GLOBALS-LABEL: @"\01??_7K@test2@@6B@" = linkonce_odr unnamed_addr constant [3 x i8*] |

