aboutsummaryrefslogtreecommitdiff
path: root/include/llvm
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2008-11-04 21:53:09 +0000
committerBill Wendling <isanbard@gmail.com>2008-11-04 21:53:09 +0000
commit80a320d974dae7666157e80b141d7ff97e5f6544 (patch)
treeddbcd7fd4bbcc1f67c0a585846a26527d187fbcb /include/llvm
parentba10fe04e7fdbf43a9cf7f7e39ef1341beea8bc5 (diff)
Update in response to feedback from Chris:
- Use enums instead of magic numbers. - Rework algorithm to use the bytes size from the target to determine when to emit stack protectors. - Get rid of "propolice" in any comments. - Renamed an option to its expanded form. - Other miscellanenous changes. More changes will come after this. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58723 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm')
-rw-r--r--include/llvm/CodeGen/Passes.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/include/llvm/CodeGen/Passes.h b/include/llvm/CodeGen/Passes.h
index 0bc14df0b9..a933309854 100644
--- a/include/llvm/CodeGen/Passes.h
+++ b/include/llvm/CodeGen/Passes.h
@@ -23,8 +23,19 @@ namespace llvm {
class FunctionPass;
class PassInfo;
class TargetMachine;
+ 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
@@ -193,7 +204,8 @@ namespace llvm {
FunctionPass *createStackSlotColoringPass();
/// createStackProtectorPass - This pass adds stack protectors to functions.
- FunctionPass *createStackProtectorPass(int Level);
+ FunctionPass *createStackProtectorPass(SSP::StackProtectorLevel lvl,
+ const TargetLowering *tli);
} // End llvm namespace