diff options
author | Reid Kleckner <reid@kleckner.net> | 2013-12-20 21:44:05 +0000 |
---|---|---|
committer | Reid Kleckner <reid@kleckner.net> | 2013-12-20 21:44:05 +0000 |
commit | 97679f3c8caa3edaea2ce577f9f22809b1bfbb2f (patch) | |
tree | 873148b06a3353bb2ae4732c60a6d250c13c3383 /test/CodeGenCXX/microsoft-abi-vtables-single-inheritance.cpp | |
parent | 8f4c85bebd40fa9cecaa8e17c00884190cf0e6a1 (diff) |
Compare canonical return types when generating MS C++ ABI vtable thunks
This was part of the cause for PR17655. We were generating thunks when
we shouldn't have. I suspect that if we tweak the test case for PR17655
to actually require thunks, we can reproduce the same crash.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197836 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGenCXX/microsoft-abi-vtables-single-inheritance.cpp')
-rw-r--r-- | test/CodeGenCXX/microsoft-abi-vtables-single-inheritance.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/CodeGenCXX/microsoft-abi-vtables-single-inheritance.cpp b/test/CodeGenCXX/microsoft-abi-vtables-single-inheritance.cpp index 6fe12b0ef0..3d5cadc718 100644 --- a/test/CodeGenCXX/microsoft-abi-vtables-single-inheritance.cpp +++ b/test/CodeGenCXX/microsoft-abi-vtables-single-inheritance.cpp @@ -14,6 +14,7 @@ // RUN: FileCheck --check-prefix=CHECK-L %s < %t // RUN: FileCheck --check-prefix=CHECK-M %s < %t // RUN: FileCheck --check-prefix=CHECK-N %s < %t +// RUN: FileCheck --check-prefix=CHECK-O %s < %t struct A { // CHECK-A: VFTable for 'A' (3 entries) @@ -250,3 +251,13 @@ struct N { }; N n; + +typedef int int_type; +struct O { virtual int f(); }; +struct P : O { virtual int_type f(); }; +P p; +// CHECK-O: VFTable for 'O' in 'P' (1 entries) +// CHECK-O-NEXT: 0 | int_type P::f() + +// CHECK-O: VFTable for 'O' (1 entries) +// CHECK-O-NEXT: 0 | int O::f() |