@@ -1153,6 +1153,9 @@ defvar LibmHasLdexpF128 = LibcallImpls<(add ldexp_f128), isNotOSWindowsOrIsCygwi
1153
1153
defvar has__stack_chk_fail = LibcallImpls<(add __stack_chk_fail), isNotOSOpenBSD>;
1154
1154
defvar has__stack_smash_handler = LibcallImpls<(add __stack_smash_handler), isOSOpenBSD>;
1155
1155
1156
+ defvar DefaultStackProtector = (add has__stack_chk_fail,
1157
+ has__stack_smash_handler);
1158
+
1156
1159
//===----------------------------------------------------------------------===//
1157
1160
// Objective-C Runtime Libcalls
1158
1161
//===----------------------------------------------------------------------===//
@@ -1230,7 +1233,7 @@ def AArch64SystemLibrary : SystemRuntimeLibrary<
1230
1233
DarwinExp10, DarwinSinCosStret,
1231
1234
LibmHasSinCosF32, LibmHasSinCosF64, LibmHasSinCosF128,
1232
1235
DefaultLibmExp10,
1233
- has__stack_chk_fail, has__stack_smash_handler )
1236
+ DefaultStackProtector )
1234
1237
>;
1235
1238
1236
1239
// Prepend a # to every name
@@ -1507,7 +1510,7 @@ def ARMSystemLibrary
1507
1510
LibcallImpls<(add __divmodsi4, __udivmodsi4),
1508
1511
RuntimeLibcallPredicate<[{TT.isOSBinFormatMachO() &&
1509
1512
(!TT.isiOS() || !TT.isOSVersionLT(5, 0))}]>>,
1510
- has__stack_chk_fail, has__stack_smash_handler )> {
1513
+ DefaultStackProtector )> {
1511
1514
let DefaultLibcallCallingConv = LibcallCallingConv<[{
1512
1515
(!TT.isOSDarwin() && !TT.isiOS() && !TT.isWatchOS() && !TT.isDriverKit()) ?
1513
1516
(FloatABI == FloatABI::Hard ? CallingConv::ARM_AAPCS_VFP
@@ -2016,7 +2019,7 @@ def PPCSystemLibrary
2016
2019
LibmHasSinCosPPCF128,
2017
2020
AvailableIf<memcpy, isNotAIX>,
2018
2021
LibcallImpls<(add Int128RTLibcalls), isPPC64>,
2019
- has__stack_chk_fail, has__stack_smash_handler )>;
2022
+ DefaultStackProtector )>;
2020
2023
2021
2024
//===----------------------------------------------------------------------===//
2022
2025
// RISCV Runtime Libcalls
@@ -2031,7 +2034,7 @@ def RISCVSystemLibrary
2031
2034
exp10f, exp10, exp10l_f128,
2032
2035
__riscv_flush_icache,
2033
2036
LibcallImpls<(add Int128RTLibcalls), isRISCV64>,
2034
- has__stack_chk_fail, has__stack_smash_handler )>;
2037
+ DefaultStackProtector )>;
2035
2038
2036
2039
//===----------------------------------------------------------------------===//
2037
2040
// SPARC Runtime Libcalls
@@ -2099,7 +2102,7 @@ def SPARCSystemLibrary
2099
2102
LibcallImpls<(add _Q_qtoll, _Q_qtoull, _Q_lltoq, _Q_ulltoq), isSPARC32>,
2100
2103
LibcallImpls<(add SPARC64_MulDivCalls, Int128RTLibcalls), isSPARC64>,
2101
2104
LibmHasSinCosF32, LibmHasSinCosF64, LibmHasSinCosF128,
2102
- has__stack_chk_fail, has__stack_smash_handler )
2105
+ DefaultStackProtector )
2103
2106
>;
2104
2107
2105
2108
//===----------------------------------------------------------------------===//
@@ -2160,8 +2163,7 @@ defvar X86CommonLibcalls =
2160
2163
// FIXME: MSVCRT doesn't have powi. The f128 case is added as a
2161
2164
// hack for one test relying on it.
2162
2165
__powitf2_f128,
2163
- has__stack_chk_fail,
2164
- has__stack_smash_handler
2166
+ DefaultStackProtector
2165
2167
);
2166
2168
2167
2169
defvar Windows32DivRemMulCalls =
@@ -2330,6 +2332,5 @@ def LegacyDefaultSystemLibrary
2330
2332
exp10f, exp10, exp10l_f128,
2331
2333
__powisf2, __powidf2, __powitf2_f128,
2332
2334
LibcallImpls<(add Int128RTLibcalls), isArch64Bit>,
2333
- has__stack_chk_fail,
2334
- has__stack_smash_handler
2335
+ DefaultStackProtector
2335
2336
)>;
0 commit comments