mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
SIL: Give project_box a field index operand.
Allow project_box to get the address of any field in a multi-field box.
This commit is contained in:
@@ -1773,7 +1773,7 @@ emitEnumElementDispatch(ArrayRef<RowToSpecialize> rows,
|
||||
// If the payload is boxed, project it.
|
||||
|
||||
if (elt->isIndirect() || elt->getParentEnum()->isIndirect()) {
|
||||
SILValue boxedValue = SGF.B.createProjectBox(loc, origCMV.getValue());
|
||||
SILValue boxedValue = SGF.B.createProjectBox(loc, origCMV.getValue(), 0);
|
||||
eltTL = &SGF.getTypeLowering(boxedValue->getType());
|
||||
if (eltTL->isLoadable())
|
||||
boxedValue = SGF.B.createLoad(loc, boxedValue);
|
||||
|
||||
Reference in New Issue
Block a user