diff options
Diffstat (limited to 'clang/lib')
| -rw-r--r-- | clang/lib/CodeGen/CGExprCXX.cpp | 3 | 
1 files changed, 2 insertions, 1 deletions
| diff --git a/clang/lib/CodeGen/CGExprCXX.cpp b/clang/lib/CodeGen/CGExprCXX.cpp index f0f706d7b95..c7adccaeeae 100644 --- a/clang/lib/CodeGen/CGExprCXX.cpp +++ b/clang/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()) { | 

