mirror of
https://github.com/RPCSX/llvm.git
synced 2024-11-28 14:10:41 +00:00
[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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282022 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
139080743f
commit
452ae8c3eb
@ -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
Block a user