summaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGExprAgg.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2014-06-03 08:40:27 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2014-06-03 08:40:27 +0000
commit046567653dd2cb1276888c2c20a4f6c762d8bd6d (patch)
tree22a5b170a5cfcc182402620d7767605a04c4585e /lib/CodeGen/CGExprAgg.cpp
parent80fe8a6c2142df4718e2482a0562ee6142de1685 (diff)
downloadclang-046567653dd2cb1276888c2c20a4f6c762d8bd6d.tar.gz
clang-046567653dd2cb1276888c2c20a4f6c762d8bd6d.tar.bz2
clang-046567653dd2cb1276888c2c20a4f6c762d8bd6d.tar.xz
Remove incorrect assertion.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@210092 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGExprAgg.cpp')
-rw-r--r--lib/CodeGen/CGExprAgg.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/CodeGen/CGExprAgg.cpp b/lib/CodeGen/CGExprAgg.cpp
index 760e6f15fa..4cb81b54cd 100644
--- a/lib/CodeGen/CGExprAgg.cpp
+++ b/lib/CodeGen/CGExprAgg.cpp
@@ -439,10 +439,9 @@ void AggExprEmitter::EmitArrayInit(llvm::Value *DestPtr, llvm::ArrayType *AType,
// type is an array (or array of array, etc.) of class type.
Expr *filler = E->getArrayFiller();
bool hasTrivialFiller = true;
- if (CXXConstructExpr *cons = dyn_cast_or_null<CXXConstructExpr>(filler)) {
- assert(cons->getConstructor()->isDefaultConstructor());
- hasTrivialFiller = cons->getConstructor()->isTrivial();
- }
+ if (CXXConstructExpr *cons = dyn_cast_or_null<CXXConstructExpr>(filler))
+ hasTrivialFiller = cons->getConstructor()->isDefaultConstructor() &&
+ cons->getConstructor()->isTrivial();
// Any remaining elements need to be zero-initialized, possibly
// using the filler expression. We can skip this if the we're