Home | History | Annotate | Download | only in CodeGenCXX
      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 @"\01??_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: }
     16