diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/Attributes.h | 4 | ||||
-rw-r--r-- | include/llvm/CodeGen/Passes.h | 13 |
2 files changed, 4 insertions, 13 deletions
diff --git a/include/llvm/Attributes.h b/include/llvm/Attributes.h index b2117dd6be..57f4e17c47 100644 --- a/include/llvm/Attributes.h +++ b/include/llvm/Attributes.h @@ -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; diff --git a/include/llvm/CodeGen/Passes.h b/include/llvm/CodeGen/Passes.h index a933309854..e9d26cf4c2 100644 --- a/include/llvm/CodeGen/Passes.h +++ b/include/llvm/CodeGen/Passes.h @@ -26,16 +26,6 @@ namespace llvm { class TargetLowering; class RegisterCoalescer; - /// StackProtectorLevel - An enumeration for when to determin when to turn - /// stack smashing protection (SSP) on. - namespace SSP { - enum StackProtectorLevel { - OFF, // Stack protectors are off. - SOME, // Stack protectors on only for functions that require them. - ALL // Stack protectors on for all functions. - }; - } // end SSP namespace - /// createUnreachableBlockEliminationPass - The LLVM code generator does not /// work well with unreachable basic blocks (what live ranges make sense for a /// block that cannot be reached?). As such, a code generator should either @@ -204,8 +194,7 @@ namespace llvm { FunctionPass *createStackSlotColoringPass(); /// createStackProtectorPass - This pass adds stack protectors to functions. - FunctionPass *createStackProtectorPass(SSP::StackProtectorLevel lvl, - const TargetLowering *tli); + FunctionPass *createStackProtectorPass(const TargetLowering *tli); } // End llvm namespace |