//===----------------------------------------------------------------------===// // LSValue //===----------------------------------------------------------------------===// void LSValue::expand(SILValue Base, SILModule *M, LSValueList &Vals, TypeExpansionAnalysis *TE) { for (const auto &P : TE->getTypeExpansion((*Base).getType(), M)) { Vals.push_back(LSValue(Base, P.getValue())); } }
void LSValue::expand(SILValue Base, SILModule *M, LSValueList &Vals, TypeExpansionAnalysis *TE) { // To expand a LSValue to its indivisible parts, we first get the // address projection paths from the accessed type to each indivisible field, // i.e. leaf nodes, then we append these projection paths to the Base. for (const auto &P : TE->getTypeExpansion((*Base).getType(), M, TEKind::TELeaf)) { Vals.push_back(LSValue(Base, P.getValue())); } }