Turns out AnalyzeBranch can modify the mbb being analyzed. This is a nasty
[oota-llvm.git] / lib / CodeGen / StackProtector.cpp
index 5a129c0d9d182930f5f9a108c0dd0b71666e216b..7c4d22df8bfc43f5a3c3b9122c1648969243ea41 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->getABITypeSize(AT))
+          if (SSPBufferSize <= TD->getTypePaddedSize(AT))
             return true;
       }
   }