diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2017-01-02 21:25:48 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2017-01-02 21:25:48 +0000 |
| commit | d88c1a5a572cdb661c111098831fa526e933756f (patch) | |
| tree | 97b32c3372106ac47ded3d1a99f9c023a8530073 /contrib/llvm/lib/CodeGen/StackProtector.cpp | |
| parent | 715652a404ee99f10c09c0a5edbb5883961b8c25 (diff) | |
| parent | b915e9e0fc85ba6f398b3fab0db6a81a8913af94 (diff) | |
Notes
Diffstat (limited to 'contrib/llvm/lib/CodeGen/StackProtector.cpp')
| -rw-r--r-- | contrib/llvm/lib/CodeGen/StackProtector.cpp | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/contrib/llvm/lib/CodeGen/StackProtector.cpp b/contrib/llvm/lib/CodeGen/StackProtector.cpp index 89868e43aba4..c2c010a29d44 100644 --- a/contrib/llvm/lib/CodeGen/StackProtector.cpp +++ b/contrib/llvm/lib/CodeGen/StackProtector.cpp @@ -50,7 +50,7 @@ static cl::opt<bool> EnableSelectionDAGSP("enable-selectiondag-sp", cl::init(true), cl::Hidden); char StackProtector::ID = 0; -INITIALIZE_PASS(StackProtector, "stack-protector", "Insert stack protectors", +INITIALIZE_TM_PASS(StackProtector, "stack-protector", "Insert stack protectors", false, true) FunctionPass *llvm::createStackProtectorPass(const TargetMachine *TM) { @@ -236,11 +236,6 @@ bool StackProtector::RequiresStackProtector() { for (const Instruction &I : BB) { if (const AllocaInst *AI = dyn_cast<AllocaInst>(&I)) { if (AI->isArrayAllocation()) { - // SSP-Strong: Enable protectors for any call to alloca, regardless - // of size. - if (Strong) - return true; - if (const auto *CI = dyn_cast<ConstantInt>(AI->getArraySize())) { if (CI->getLimitedValue(SSPBufferSize) >= SSPBufferSize) { // A call to alloca with size >= SSPBufferSize requires |
