File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -1222,22 +1222,28 @@ simd_op_to_llvm_type (int opcode)
1222
1222
#endif
1223
1223
}
1224
1224
1225
+ #if defined(TARGET_OSX ) || defined(TARGET_LINUX )
1226
+ #define COLD_CCONV_SUPPORTED 1
1227
+ #elif !defined(TARGET_WATCHOS ) && !defined(TARGET_ARM ) && !defined(TARGET_ARM64 )
1228
+ #define COLD_CCONV_SUPPORTED 1
1229
+ #endif
1230
+
1225
1231
static void
1226
1232
set_cold_cconv (LLVMValueRef func )
1227
1233
{
1228
1234
/*
1229
1235
* xcode10 (watchOS) and ARM/ARM64 doesn't seem to support preserveall, it fails with:
1230
1236
* fatal error: error in backend: Unsupported calling convention
1231
1237
*/
1232
- #if !defined( TARGET_WATCHOS ) && !defined( TARGET_ARM ) && !defined( TARGET_ARM64 )
1238
+ #ifdef COLD_CCONV_SUPPORTED
1233
1239
LLVMSetFunctionCallConv (func , LLVMColdCallConv );
1234
1240
#endif
1235
1241
}
1236
1242
1237
1243
static void
1238
1244
set_call_cold_cconv (LLVMValueRef func )
1239
1245
{
1240
- #if !defined( TARGET_WATCHOS ) && !defined( TARGET_ARM ) && !defined( TARGET_ARM64 )
1246
+ #ifdef COLD_CCONV_SUPPORTED
1241
1247
LLVMSetInstructionCallConv (func , LLVMColdCallConv );
1242
1248
#endif
1243
1249
}
You can’t perform that action at this time.
0 commit comments