summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGenCXX/microsoft-abi-vtables-multiple-nonvirtual-inheritance.cpp
diff options
context:
space:
mode:
authorTimur Iskhodzhanov <timurrrr@google.com>2013-10-08 19:15:38 +0000
committerTimur Iskhodzhanov <timurrrr@google.com>2013-10-08 19:15:38 +0000
commit1ffb3916ce2ca71d1827db0cf39b7a0876e68ca7 (patch)
tree181eaf94cdb1e23dbf5b7bab845ba1a97377d1b5 /clang/test/CodeGenCXX/microsoft-abi-vtables-multiple-nonvirtual-inheritance.cpp
parent71cd285dc84426c786010c3bdbfcbfb1f7e23016 (diff)
downloadbcm5719-llvm-1ffb3916ce2ca71d1827db0cf39b7a0876e68ca7.tar.gz
bcm5719-llvm-1ffb3916ce2ca71d1827db0cf39b7a0876e68ca7.zip
Abstract out parts of thunk emission code, add support for simple thunks when using -cxx-abi microsoft
Reviewed at http://llvm-reviews.chandlerc.com/D1787 llvm-svn: 192220
Diffstat (limited to 'clang/test/CodeGenCXX/microsoft-abi-vtables-multiple-nonvirtual-inheritance.cpp')
-rw-r--r--clang/test/CodeGenCXX/microsoft-abi-vtables-multiple-nonvirtual-inheritance.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/clang/test/CodeGenCXX/microsoft-abi-vtables-multiple-nonvirtual-inheritance.cpp b/clang/test/CodeGenCXX/microsoft-abi-vtables-multiple-nonvirtual-inheritance.cpp
index a0436c8e810..8dad4dd7794 100644
--- a/clang/test/CodeGenCXX/microsoft-abi-vtables-multiple-nonvirtual-inheritance.cpp
+++ b/clang/test/CodeGenCXX/microsoft-abi-vtables-multiple-nonvirtual-inheritance.cpp
@@ -18,6 +18,7 @@
// RUN: FileCheck --check-prefix=RET-THUNKS-Test3 %s < %t
// RUN: FileCheck --check-prefix=RET-THUNKS-Test4 %s < %t
// RUN: FileCheck --check-prefix=RET-THUNKS-Test5 %s < %t
+// RUN: FileCheck --check-prefix=RET-THUNKS-Test6 %s < %t
// RUN: FileCheck --check-prefix=MANGLING %s < %t
@@ -458,4 +459,22 @@ struct Test5 : Ret1, Test1 {
};
Test5 t5;
+
+struct Ret3 : this_adjustment::Test1 { };
+
+struct Test6 : Test1 {
+ virtual Ret3* foo();
+ // RET-THUNKS-Test6: VFTable for 'return_adjustment::Ret1' in 'return_adjustment::Test1' in 'return_adjustment::Test6' (4 entries).
+ // RET-THUNKS-Test6-NEXT: 0 | return_adjustment::Ret3 *return_adjustment::Test6::foo()
+ // RET-THUNKS-Test6-NEXT: [return adjustment: 4 non-virtual]
+ // RET-THUNKS-Test6-NEXT: 1 | void return_adjustment::Ret1::z()
+ // RET-THUNKS-Test6-NEXT: 2 | return_adjustment::Ret3 *return_adjustment::Test6::foo()
+ // RET-THUNKS-Test6-NEXT: 3 | return_adjustment::Ret3 *return_adjustment::Test6::foo()
+
+ // RET-THUNKS-Test6: VFTable indices for 'return_adjustment::Test6' (1 entries).
+ // RET-THUNKS-Test6-NEXT: 3 | return_adjustment::Ret3 *return_adjustment::Test6::foo()
+};
+
+Test6 t6;
+
}
OpenPOWER on IntegriCloud