| 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 |
}; |
| 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: } |