forked from OSchip/llvm-project
[CodeGen] stop short-circuiting the SSP code for sspstrong.
This check caused us to skip adding layout information for calls to alloca in sspreq/sspstrong mode. We check properly for sspstrong later on (and add the correct layout info when doing so), so removing this shouldn't hurt. No test is included, since testing this using lit seems to require checking for exact offsets in asm, which is something that the lit tests for this avoid. If someone cares deeply, I'm happy to write a unittest or something to cover this, but that feels like overkill. Patch by Daniel Micay. Differential Revision: https://reviews.llvm.org/D22714 llvm-svn: 282022
This commit is contained in:
parent
bf04708e11
commit
b44b6d98b3
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue