When initializing a primitive array, we don't need to dup the base
pointer for every element.
for (const Expr *Init : InitList->inits()) {
if (std::optional<PrimType> T = classify(Init->getType())) {
// Visit the primitive element like normal.
- if (!this->emitDupPtr(Init))
- return false;
if (!this->visit(Init))
return false;
if (!this->emitInitElem(*T, ElementIndex, Init))
if (!visitInitializer(Init))
return false;
- }
if (!this->emitPopPtr(Init))
return false;
+ }
++ElementIndex;
}