diff options
author | David Majnemer <david.majnemer@gmail.com> | 2015-05-26 21:28:50 +0000 |
---|---|---|
committer | David Majnemer <david.majnemer@gmail.com> | 2015-05-26 21:28:50 +0000 |
commit | 67fa0b85cd7bc514783490d2b7ceca97b84839b2 (patch) | |
tree | 2acd66b10908bc9a09dccbfc50afac6ec6605fba /clang/lib/CodeGen/CGExprConstant.cpp | |
parent | c74f73f2a02647c5c793fc71779ac2c33c51eff5 (diff) | |
download | bcm5719-llvm-67fa0b85cd7bc514783490d2b7ceca97b84839b2.tar.gz bcm5719-llvm-67fa0b85cd7bc514783490d2b7ceca97b84839b2.zip |
[CodeGen] Handle flexible array members containing pointers to members
Types can be classified as being zero-initializable or
non-zero-initializable. We used to classify array types by giving them
the classification of their base element type. However, incomplete
array types are never initialized directly and thus are always
zero-initializable.
llvm-svn: 238256
Diffstat (limited to 'clang/lib/CodeGen/CGExprConstant.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGExprConstant.cpp | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/clang/lib/CodeGen/CGExprConstant.cpp b/clang/lib/CodeGen/CGExprConstant.cpp index f94213ac940..73ca0cc1c3d 100644 --- a/clang/lib/CodeGen/CGExprConstant.cpp +++ b/clang/lib/CodeGen/CGExprConstant.cpp @@ -1408,10 +1408,6 @@ llvm::Constant *CodeGenModule::EmitNullConstant(QualType T) { llvm::Constant *Element = EmitNullConstant(ElementTy); unsigned NumElements = CAT->getSize().getZExtValue(); - - if (Element->isNullValue()) - return llvm::ConstantAggregateZero::get(ATy); - SmallVector<llvm::Constant *, 8> Array(NumElements, Element); return llvm::ConstantArray::get(ATy, Array); } |