Skip to content
Commit b31b94a8 authored by Saleem Abdulrasool's avatar Saleem Abdulrasool
Browse files

CodeGen: correct materialize temporary aggregates in ARC mode

Avoid an assertion when materializing a lifetime type aggregate temporary.  When
performing CodeGen for ObjC++, we could generate a lifetime-only aggregate
temporary by using an initializer list (which is effectively an array).  We
would reach through the temporary expression, fishing out the inner expression.
If this expression was a lifetime expression, we would attempt to emit this as a
scalar.  This would eventually result in an assertion as the emission would
eventually assert that the expression being emitted has a scalar evaluation
kind.

Add a case to handle the aggregate expressions.  Use the EmitAggExpr to emit the
aggregate expression rather than the EmitScalarInit.

Addresses PR21347.

llvm-svn: 220590
parent 202210b3
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment