Skip to content

Commit 1fc368e

Browse files
committed
DefaultStackProtector
1 parent 5f116e4 commit 1fc368e

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

llvm/include/llvm/IR/RuntimeLibcalls.td

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1153,6 +1153,9 @@ defvar LibmHasLdexpF128 = LibcallImpls<(add ldexp_f128), isNotOSWindowsOrIsCygwi
11531153
defvar has__stack_chk_fail = LibcallImpls<(add __stack_chk_fail), isNotOSOpenBSD>;
11541154
defvar has__stack_smash_handler = LibcallImpls<(add __stack_smash_handler), isOSOpenBSD>;
11551155

1156+
defvar DefaultStackProtector = (add has__stack_chk_fail,
1157+
has__stack_smash_handler);
1158+
11561159
//===----------------------------------------------------------------------===//
11571160
// Objective-C Runtime Libcalls
11581161
//===----------------------------------------------------------------------===//
@@ -1230,7 +1233,7 @@ def AArch64SystemLibrary : SystemRuntimeLibrary<
12301233
DarwinExp10, DarwinSinCosStret,
12311234
LibmHasSinCosF32, LibmHasSinCosF64, LibmHasSinCosF128,
12321235
DefaultLibmExp10,
1233-
has__stack_chk_fail, has__stack_smash_handler)
1236+
DefaultStackProtector)
12341237
>;
12351238

12361239
// Prepend a # to every name
@@ -1507,7 +1510,7 @@ def ARMSystemLibrary
15071510
LibcallImpls<(add __divmodsi4, __udivmodsi4),
15081511
RuntimeLibcallPredicate<[{TT.isOSBinFormatMachO() &&
15091512
(!TT.isiOS() || !TT.isOSVersionLT(5, 0))}]>>,
1510-
has__stack_chk_fail, has__stack_smash_handler)> {
1513+
DefaultStackProtector)> {
15111514
let DefaultLibcallCallingConv = LibcallCallingConv<[{
15121515
(!TT.isOSDarwin() && !TT.isiOS() && !TT.isWatchOS() && !TT.isDriverKit()) ?
15131516
(FloatABI == FloatABI::Hard ? CallingConv::ARM_AAPCS_VFP
@@ -2016,7 +2019,7 @@ def PPCSystemLibrary
20162019
LibmHasSinCosPPCF128,
20172020
AvailableIf<memcpy, isNotAIX>,
20182021
LibcallImpls<(add Int128RTLibcalls), isPPC64>,
2019-
has__stack_chk_fail, has__stack_smash_handler)>;
2022+
DefaultStackProtector)>;
20202023

20212024
//===----------------------------------------------------------------------===//
20222025
// RISCV Runtime Libcalls
@@ -2031,7 +2034,7 @@ def RISCVSystemLibrary
20312034
exp10f, exp10, exp10l_f128,
20322035
__riscv_flush_icache,
20332036
LibcallImpls<(add Int128RTLibcalls), isRISCV64>,
2034-
has__stack_chk_fail, has__stack_smash_handler)>;
2037+
DefaultStackProtector)>;
20352038

20362039
//===----------------------------------------------------------------------===//
20372040
// SPARC Runtime Libcalls
@@ -2099,7 +2102,7 @@ def SPARCSystemLibrary
20992102
LibcallImpls<(add _Q_qtoll, _Q_qtoull, _Q_lltoq, _Q_ulltoq), isSPARC32>,
21002103
LibcallImpls<(add SPARC64_MulDivCalls, Int128RTLibcalls), isSPARC64>,
21012104
LibmHasSinCosF32, LibmHasSinCosF64, LibmHasSinCosF128,
2102-
has__stack_chk_fail, has__stack_smash_handler)
2105+
DefaultStackProtector)
21032106
>;
21042107

21052108
//===----------------------------------------------------------------------===//
@@ -2160,8 +2163,7 @@ defvar X86CommonLibcalls =
21602163
// FIXME: MSVCRT doesn't have powi. The f128 case is added as a
21612164
// hack for one test relying on it.
21622165
__powitf2_f128,
2163-
has__stack_chk_fail,
2164-
has__stack_smash_handler
2166+
DefaultStackProtector
21652167
);
21662168

21672169
defvar Windows32DivRemMulCalls =
@@ -2330,6 +2332,5 @@ def LegacyDefaultSystemLibrary
23302332
exp10f, exp10, exp10l_f128,
23312333
__powisf2, __powidf2, __powitf2_f128,
23322334
LibcallImpls<(add Int128RTLibcalls), isArch64Bit>,
2333-
has__stack_chk_fail,
2334-
has__stack_smash_handler
2335+
DefaultStackProtector
23352336
)>;

0 commit comments

Comments
 (0)