llvm-project/clang/test/CodeGenCXX/microsoft-abi-vmemptr-fastcall.cpp
David Majnemer e0e228a380 Reinstate r239499 and r239503
They were reverted because the FileCheck patterns didn't match on
release builds.

llvm-svn: 239512
2015-06-11 08:12:44 +00:00

16 lines
678 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 @"\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: }