diff options
| author | 2017-01-24 08:39:00 +0000 | |
|---|---|---|
| committer | 2017-01-24 08:39:00 +0000 | |
| commit | 78b306486612785150cf0fa168c56d015802182a (patch) | |
| tree | fb9db7510c6eba1d7eeacca99246eb577635ee28 /gnu/llvm/lib/CodeGen/StackProtector.cpp | |
| parent | Import LLVM 4.0.0 rc1 including clang and lld to help the current (diff) | |
| download | wireguard-openbsd-78b306486612785150cf0fa168c56d015802182a.tar.xz wireguard-openbsd-78b306486612785150cf0fa168c56d015802182a.zip | |
Merge LLVM 4.0.0 rc1
Diffstat (limited to 'gnu/llvm/lib/CodeGen/StackProtector.cpp')
| -rw-r--r-- | gnu/llvm/lib/CodeGen/StackProtector.cpp | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/gnu/llvm/lib/CodeGen/StackProtector.cpp b/gnu/llvm/lib/CodeGen/StackProtector.cpp index 89868e43aba..c2c010a29d4 100644 --- a/gnu/llvm/lib/CodeGen/StackProtector.cpp +++ b/gnu/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 |
