summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGenCXX/microsoft-abi-vmemptr-fastcall.cpp
diff options
context:
space:
mode:
authorReid Kleckner <reid@kleckner.net>2014-08-29 21:43:29 +0000
committerReid Kleckner <reid@kleckner.net>2014-08-29 21:43:29 +0000
commitc34735148f00ca26ebf29eb5a3ec8a42075509e0 (patch)
tree085400f10364f0ed1839fc4894c8cf25b169e414 /clang/test/CodeGenCXX/microsoft-abi-vmemptr-fastcall.cpp
parentdccd0cbec3d6eb835362d921c6bd33a5cc0a920f (diff)
downloadbcm5719-llvm-c34735148f00ca26ebf29eb5a3ec8a42075509e0.tar.gz
bcm5719-llvm-c34735148f00ca26ebf29eb5a3ec8a42075509e0.zip
Make all virtual member pointers use variadic musttail calls
This avoids encoding information about the function prototype into the thunk at the cost of some function prototype bitcast gymnastics. Fixes PR20653. llvm-svn: 216782
Diffstat (limited to 'clang/test/CodeGenCXX/microsoft-abi-vmemptr-fastcall.cpp')
-rw-r--r--clang/test/CodeGenCXX/microsoft-abi-vmemptr-fastcall.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/clang/test/CodeGenCXX/microsoft-abi-vmemptr-fastcall.cpp b/clang/test/CodeGenCXX/microsoft-abi-vmemptr-fastcall.cpp
new file mode 100644
index 00000000000..9d55383d656
--- /dev/null
+++ b/clang/test/CodeGenCXX/microsoft-abi-vmemptr-fastcall.cpp
@@ -0,0 +1,11 @@
+// RUN: %clang_cc1 -triple i686-pc-windows-msvc %s -emit-llvm-only -verify
+
+// We reject this because LLVM doesn't forward the second regparm through the
+// thunk.
+
+struct A {
+ virtual void __fastcall f(int a, int b);
+};
+void (__fastcall A::*doit())(int, int) {
+ return &A::f; // expected-error {{cannot compile this pointer to fastcall virtual member function yet}}
+}
OpenPOWER on IntegriCloud