summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
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
commit7dce16f69dc3e26cb74d5ad38b0648a6f47f9640 (patch)
tree2dd132fcbfad8a3b72515d2b2d097100bf23f3e5 /llvm/lib/CodeGen
parentf0544c2086a1a592e294f24d62973ce732af33da (diff)
downloadbcm5719-llvm-7dce16f69dc3e26cb74d5ad38b0648a6f47f9640.tar.gz
bcm5719-llvm-7dce16f69dc3e26cb74d5ad38b0648a6f47f9640.zip
[stackprotector] Add in the stackprotector libcall.
We support this libcall on all platforms except for OpenBSD (See lib/Codegen/StackProtector.cpp). llvm-svn: 188193
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/TargetLoweringBase.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/TargetLoweringBase.cpp b/llvm/lib/CodeGen/TargetLoweringBase.cpp
index b3711adce04..55125bd23f9 100644
--- a/llvm/lib/CodeGen/TargetLoweringBase.cpp
+++ b/llvm/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.
OpenPOWER on IntegriCloud