xref: /llvm-project/clang/test/CodeGenCXX/microsoft-abi-vmemptr-fastcall.cpp (revision 1b9a6e58a8b831193c9e5e733f881aabe0d2d06b)
1 // RUN: %clang_cc1 -fms-extensions -triple i686-pc-windows-msvc %s -emit-llvm -o - | FileCheck %s
2 
3 struct A {
4   virtual void __fastcall f(int a, int b);
5 };
doit()6 void (__fastcall A::*doit())(int, int) {
7   return &A::f;
8 }
9 
10 // CHECK: define linkonce_odr x86_fastcallcc void @"??_9A@@$BA@AI"(ptr inreg noundef %this, ...) {{.*}} comdat align 2 {
11 // CHECK: [[VPTR:%.*]] = getelementptr inbounds ptr, ptr %{{.*}}, i64 0
12 // CHECK: [[CALLEE:%.*]] = load ptr, ptr [[VPTR]]
13 // CHECK: musttail call x86_fastcallcc void (ptr, ...) [[CALLEE]](ptr inreg noundef %{{.*}}, ...)
14 // CHECK: ret void
15 // CHECK: }
16