Implement stack protectors as function attributes: "ssp" and "sspreq".

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59202 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Bill Wendling
2008-11-13 01:02:14 +00:00
parent 7fc610f073
commit e9e6bdf27f
7 changed files with 27 additions and 44 deletions

View File

@@ -47,6 +47,8 @@ const Attributes ReadOnly = 1<<10; ///< Function only reads from memory
const Attributes NoInline = 1<<11; // inline=never
const Attributes AlwaysInline = 1<<12; // inline=always
const Attributes OptimizeForSize = 1<<13; // opt_size
const Attributes StackProtect = 1<<14; // Stack protection.
const Attributes StackProtectReq = 1<<15; // Stack protection required.
const Attributes Alignment = 0xffff<<16; ///< Alignment of parameter (16 bits)
// 0 = unknown, else in clear (not log)
@@ -55,7 +57,7 @@ const Attributes ParameterOnly = ByVal | Nest | StructRet;
/// @brief Attributes that only apply to function.
const Attributes FunctionOnly = NoReturn | NoUnwind | ReadNone | ReadOnly |
NoInline | AlwaysInline | OptimizeForSize;
NoInline | AlwaysInline | OptimizeForSize | StackProtect | StackProtectReq;
/// @brief Parameter attributes that do not apply to vararg call arguments.
const Attributes VarArgsIncompatible = StructRet;