Apply patch review feedback.
[oota-llvm.git] / lib / CodeGen / StackProtector.cpp
index c333acd42a8b543e2ba23f33a266b16ef4a5d568..c179f1e3df97cea83db1dd22641ffcb36c5e6988 100644 (file)
@@ -114,7 +114,7 @@ bool StackProtector::RequiresStackProtector() const {
         if (const ArrayType *AT = dyn_cast<ArrayType>(AI->getAllocatedType()))
           // If an array has more than SSPBufferSize bytes of allocated space,
           // then we emit stack protectors.
-          if (SSPBufferSize <= TD->getTypePaddedSize(AT))
+          if (SSPBufferSize <= TD->getTypeAllocSize(AT))
             return true;
       }
   }