diff options
Diffstat (limited to 'lib/CodeGen/CGExprCXX.cpp')
| -rw-r--r-- | lib/CodeGen/CGExprCXX.cpp | 3 | 
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/CodeGen/CGExprCXX.cpp b/lib/CodeGen/CGExprCXX.cpp index f0f706d7b957d..c7adccaeeaeaf 100644 --- a/lib/CodeGen/CGExprCXX.cpp +++ b/lib/CodeGen/CGExprCXX.cpp @@ -1548,7 +1548,8 @@ namespace {          // The size of an element, multiplied by the number of elements.          llvm::Value *Size            = llvm::ConstantInt::get(SizeTy, ElementTypeSize.getQuantity()); -        Size = CGF.Builder.CreateMul(Size, NumElements); +        if (NumElements) +          Size = CGF.Builder.CreateMul(Size, NumElements);          // Plus the size of the cookie if applicable.          if (!CookieSize.isZero()) {  | 
