llvm-project/clang/test/CodeGenCXX/microsoft-abi-vmemptr-fastcall.cpp
Nikita Popov 1b9a6e58a8 [CodeGenCXX] Convert some tests to opaque pointers (NFC)
Conversion done using the script at
https://gist.github.com/nikic/98357b71fd67756b0f064c9517b62a34.

These are tests where the conversion worked out of the box and no
manual fixup was performed.
2022-10-06 12:22:03 +02:00

16 lines
588 B
C++

// 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);
};
void (__fastcall A::*doit())(int, int) {
return &A::f;
}
// CHECK: define linkonce_odr x86_fastcallcc void @"??_9A@@$BA@AI"(ptr inreg noundef %this, ...) {{.*}} comdat align 2 {
// CHECK: [[VPTR:%.*]] = getelementptr inbounds ptr, ptr %{{.*}}, i64 0
// CHECK: [[CALLEE:%.*]] = load ptr, ptr [[VPTR]]
// CHECK: musttail call x86_fastcallcc void (ptr, ...) [[CALLEE]](ptr inreg noundef %{{.*}}, ...)
// CHECK: ret void
// CHECK: }