1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2025-02-01 05:01:59 +01:00

[stackprotector] Add in the stackprotector libcall.

We support this libcall on all platforms except for OpenBSD (See
lib/Codegen/StackProtector.cpp).

llvm-svn: 188193
This commit is contained in:
Michael Gottesman 2013-08-12 18:45:38 +00:00
parent e32ebb94bd
commit defd024179
2 changed files with 10 additions and 0 deletions

View File

@ -354,6 +354,9 @@ namespace RTLIB {
SYNC_FETCH_AND_NAND_4,
SYNC_FETCH_AND_NAND_8,
// Stack Protector Fail.
STACKPROTECTOR_CHECK_FAIL,
UNKNOWN_LIBCALL
};

View File

@ -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.