blob: 59e8b0b8c2c89d0f01ded1a0e71bec7c2e1512dd [file] [log] [blame]
Andrew Top61a84952019-04-30 15:07:33 -07001// RUN: %clang_cc1 -fms-extensions -triple i686-pc-windows-msvc %s -emit-llvm -o - | FileCheck %s
2
3struct A {
4 virtual void __fastcall f(int a, int b);
5};
6void (__fastcall A::*doit())(int, int) {
7 return &A::f;
8}
9
10// CHECK: define linkonce_odr x86_fastcallcc void @"??_9A@@$BA@AI"(%struct.A* inreg %this, ...) {{.*}} comdat align 2 {
11// CHECK: [[VPTR:%.*]] = getelementptr inbounds void (%struct.A*, ...)*, void (%struct.A*, ...)** %{{.*}}, i64 0
12// CHECK: [[CALLEE:%.*]] = load void (%struct.A*, ...)*, void (%struct.A*, ...)** [[VPTR]]
13// CHECK: musttail call x86_fastcallcc void (%struct.A*, ...) [[CALLEE]](%struct.A* inreg %{{.*}}, ...)
14// CHECK: ret void
15// CHECK: }