1 // RUN: %clang_cc1 -triple x86_64-windows-gnu -o - -emit-llvm %s | FileCheck %s -check-prefix CHECK-WIN
2 // RUN: %clang_cc1 -triple x86_64-linux-gnu -o - -emit-llvm %s | FileCheck %s -check-prefix CHECK-LIN
4 typedef __PTRDIFF_TYPE__
ptrdiff_t;
5 template <typename FTy
> ptrdiff_t func_as_int(FTy
*fp
) { return ptrdiff_t(fp
); }
8 int __attribute__((sysv_abi
)) f_sysvabi(int);
9 int __attribute__((ms_abi
)) f_msabi(int);
12 rv
+= func_as_int(f_plain
);
13 rv
+= func_as_int(f_sysvabi
);
14 rv
+= func_as_int(f_msabi
);
18 // CHECK-WIN: define dso_local noundef i64 @_Z7useThemv()
19 // CHECK-WIN: call noundef i64 @_Z11func_as_intIFiiEExPT_(i32 (i32)* noundef @_Z7f_plaini)
20 // CHECK-WIN: call noundef i64 @_Z11func_as_intIU8sysv_abiFiiEExPT_(i32 (i32)* noundef @_Z9f_sysvabii)
21 // CHECK-WIN: call noundef i64 @_Z11func_as_intIFiiEExPT_(i32 (i32)* noundef @_Z7f_msabii)
23 // CHECK-LIN: define{{.*}} i64 @_Z7useThemv()
24 // CHECK-LIN: call noundef i64 @_Z11func_as_intIFiiEElPT_(i32 (i32)* noundef @_Z7f_plaini)
25 // CHECK-LIN: call noundef i64 @_Z11func_as_intIFiiEElPT_(i32 (i32)* noundef @_Z9f_sysvabii)
26 // CHECK-LIN: call noundef i64 @_Z11func_as_intIU6ms_abiFiiEElPT_(i32 (i32)* noundef @_Z7f_msabii)