summaryrefslogtreecommitdiff
path: root/lib/CodeGen/TargetLoweringBase.cpp
diff options
context:
space:
mode:
authorMichael Gottesman <mgottesman@apple.com>2013-08-12 18:45:38 +0000
committerMichael Gottesman <mgottesman@apple.com>2013-08-12 18:45:38 +0000
commit15b2782ccf141930cc98507a1cb1d501fbfd4000 (patch)
treea82067a00fd444fd96c633f4b28807170c474439 /lib/CodeGen/TargetLoweringBase.cpp
parent2a64a639e5f2870a2a898a593fc37a800f977d5e (diff)
[stackprotector] Add in the stackprotector libcall.
We support this libcall on all platforms except for OpenBSD (See lib/Codegen/StackProtector.cpp). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188193 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/TargetLoweringBase.cpp')
-rw-r--r--lib/CodeGen/TargetLoweringBase.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/CodeGen/TargetLoweringBase.cpp b/lib/CodeGen/TargetLoweringBase.cpp
index b3711adce04..55125bd23f9 100644
--- a/lib/CodeGen/TargetLoweringBase.cpp
+++ b/lib/CodeGen/TargetLoweringBase.cpp
@@ -361,6 +361,13 @@ static void InitLibcallNames(const char **Names, const TargetMachine &TM) {
Names[RTLIB::SINCOS_F128] = 0;
Names[RTLIB::SINCOS_PPCF128] = 0;
}
+
+ if (Triple(TM.getTargetTriple()).getOS() != Triple::OpenBSD) {
+ Names[RTLIB::STACKPROTECTOR_CHECK_FAIL] = "__stack_chk_fail";
+ } else {
+ // These are generally not available.
+ Names[RTLIB::STACKPROTECTOR_CHECK_FAIL] = 0;
+ }
}
/// InitLibcallCallingConvs - Set default libcall CallingConvs.