summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/LLVMTargetMachine.cpp
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2008-11-13 01:02:14 +0000
committerBill Wendling <isanbard@gmail.com>2008-11-13 01:02:14 +0000
commitccb67a3d85a227b045b740ce6c39ae169425f060 (patch)
treed413a3874f8bf4466ac23c7d50942331dea6b7ee /llvm/lib/CodeGen/LLVMTargetMachine.cpp
parentf75c823e5c2ab23878c060e0825b9fe99fac2d52 (diff)
downloadbcm5719-llvm-ccb67a3d85a227b045b740ce6c39ae169425f060.tar.gz
bcm5719-llvm-ccb67a3d85a227b045b740ce6c39ae169425f060.zip
Implement stack protectors as function attributes: "ssp" and "sspreq".
llvm-svn: 59202
Diffstat (limited to 'llvm/lib/CodeGen/LLVMTargetMachine.cpp')
-rw-r--r--llvm/lib/CodeGen/LLVMTargetMachine.cpp16
1 files changed, 1 insertions, 15 deletions
diff --git a/llvm/lib/CodeGen/LLVMTargetMachine.cpp b/llvm/lib/CodeGen/LLVMTargetMachine.cpp
index fee70b00154..2397a160e93 100644
--- a/llvm/lib/CodeGen/LLVMTargetMachine.cpp
+++ b/llvm/lib/CodeGen/LLVMTargetMachine.cpp
@@ -60,19 +60,6 @@ static cl::opt<cl::boolOrDefault>
EnableFastISelOption("fast-isel", cl::Hidden,
cl::desc("Enable the experimental \"fast\" instruction selector"));
-// Enable stack protectors.
-static cl::opt<SSP::StackProtectorLevel>
-EnableStackProtector("enable-stack-protector",
- cl::desc("Stack canary protection level: (default: off)"),
- cl::init(SSP::OFF),
- cl::values(clEnumValN(SSP::ALL, "all",
- "All functions get stack protectors."),
- clEnumValN(SSP::SOME, "some",
- "Only functions requiring stack protectors get them."),
- clEnumValN(SSP::OFF, "off",
- "No functions get stack protectors."),
- clEnumValEnd));
-
FileModel::Model
LLVMTargetMachine::addPassesToEmitFile(PassManagerBase &PM,
raw_ostream &Out,
@@ -178,8 +165,7 @@ bool LLVMTargetMachine::addCommonCodeGenPasses(PassManagerBase &PM, bool Fast) {
if (!Fast)
PM.add(createCodeGenPreparePass(getTargetLowering()));
- if (EnableStackProtector != SSP::OFF)
- PM.add(createStackProtectorPass(EnableStackProtector, getTargetLowering()));
+ PM.add(createStackProtectorPass(getTargetLowering()));
if (PrintISelInput)
PM.add(createPrintFunctionPass("\n\n"
OpenPOWER on IntegriCloud