@@ -278,7 +278,8 @@ getLayoutFunctionForComputedComponent(IRGenModule &IGM,
278278
279279 auto layoutFn = llvm::Function::Create (fnTy,
280280 llvm::GlobalValue::PrivateLinkage, " keypath_get_arg_layout" , IGM.getModule ());
281-
281+ layoutFn->setCallingConv (IGM.SwiftCC );
282+
282283 {
283284 IRGenFunction IGF (IGM, layoutFn);
284285 if (IGM.DebugInfo )
@@ -378,6 +379,7 @@ getWitnessTableForComputedComponent(IRGenModule &IGM,
378379 /* vararg*/ false );
379380 auto destroyFn = llvm::Function::Create (destroyType,
380381 llvm::GlobalValue::PrivateLinkage, " keypath_destroy" , IGM.getModule ());
382+ destroyFn->setCallingConv (IGM.SwiftCC );
381383 destroy = destroyFn;
382384
383385 IRGenFunction IGF (IGM, destroyFn);
@@ -426,6 +428,7 @@ getWitnessTableForComputedComponent(IRGenModule &IGM,
426428 /* vararg*/ false );
427429 auto copyFn = llvm::Function::Create (copyType,
428430 llvm::GlobalValue::PrivateLinkage, " keypath_copy" , IGM.getModule ());
431+ copyFn->setCallingConv (IGM.SwiftCC );
429432 copy = copyFn;
430433
431434 IRGenFunction IGF (IGM, copyFn);
@@ -539,6 +542,8 @@ getInitializerForComputedComponent(IRGenModule &IGM,
539542
540543 auto initFn = llvm::Function::Create (fnTy,
541544 llvm::GlobalValue::PrivateLinkage, " keypath_arg_init" , IGM.getModule ());
545+ initFn->setCallingConv (IGM.SwiftCC );
546+
542547
543548 {
544549 IRGenFunction IGF (IGM, initFn);
0 commit comments