summaryrefslogtreecommitdiffstats
path: root/test/CodeGenCXX/microsoft-abi-vmemptr-fastcall.cpp
diff options
context:
space:
mode:
authorDavid Majnemer <david.majnemer@gmail.com>2015-06-11 08:12:44 +0000
committerDavid Majnemer <david.majnemer@gmail.com>2015-06-11 08:12:44 +0000
commit3041465dd0c0c6d5a4cc6ffdf94c9366a9a582d7 (patch)
treeb42abc44a9cf611f5cc3b6e1a45f4866b30cc21e /test/CodeGenCXX/microsoft-abi-vmemptr-fastcall.cpp
parenta1352f6ef369b3c894b621778b4baaab6ed5bb1a (diff)
Reinstate r239499 and r239503
They were reverted because the FileCheck patterns didn't match on release builds. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@239512 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGenCXX/microsoft-abi-vmemptr-fastcall.cpp')
-rw-r--r--test/CodeGenCXX/microsoft-abi-vmemptr-fastcall.cpp14
1 files changed, 9 insertions, 5 deletions
diff --git a/test/CodeGenCXX/microsoft-abi-vmemptr-fastcall.cpp b/test/CodeGenCXX/microsoft-abi-vmemptr-fastcall.cpp
index 6d42b8504a..97ab1996c8 100644
--- a/test/CodeGenCXX/microsoft-abi-vmemptr-fastcall.cpp
+++ b/test/CodeGenCXX/microsoft-abi-vmemptr-fastcall.cpp
@@ -1,11 +1,15 @@
-// RUN: %clang_cc1 -fms-extensions -triple i686-pc-windows-msvc %s -emit-llvm-only -verify
-
-// We reject this because LLVM doesn't forward the second regparm through the
-// thunk.
+// RUN: %clang_cc1 -fms-extensions -triple i686-pc-windows-msvc %s -emit-llvm -o - | FileCheck %s
struct A {
- virtual void __fastcall f(int a, int b); // expected-error {{cannot compile this pointer to fastcall virtual member function yet}}
+ virtual void __fastcall f(int a, int b);
};
void (__fastcall A::*doit())(int, int) {
return &A::f;
}
+
+// CHECK: define linkonce_odr x86_fastcallcc void @"\01??_9A@@$BA@AI"(%struct.A* inreg %this, ...) {{.*}} comdat align 2 {
+// CHECK: [[VPTR:%.*]] = getelementptr inbounds void (%struct.A*, ...)*, void (%struct.A*, ...)** %{{.*}}, i64 0
+// CHECK: [[CALLEE:%.*]] = load void (%struct.A*, ...)*, void (%struct.A*, ...)** [[VPTR]]
+// CHECK: musttail call x86_fastcallcc void (%struct.A*, ...) [[CALLEE]](%struct.A* inreg %{{.*}}, ...)
+// CHECK: ret void
+// CHECK: }