[SIL] InitAccessors: Reference a field that assign_or_init is associated with

The field removes the need to dig through init accessor reference
to find what stored properties and handled by the instruction.
This commit is contained in:
Pavel Yaskevich
2023-07-26 17:21:25 -07:00
parent 1a9c2e63f5
commit ddad2a7dad
5 changed files with 22 additions and 24 deletions

View File

@@ -1859,6 +1859,7 @@ void SILGenFunction::emitAssignOrInit(SILLocation loc, ManagedValue selfValue,
setterFRef = SILUndef::get(initFRef->getType(), F);
}
B.createAssignOrInit(loc, selfValue.getValue(), newValue.forward(*this),
initFRef, setterFRef, AssignOrInitInst::Unknown);
B.createAssignOrInit(loc, field, selfValue.getValue(),
newValue.forward(*this), initFRef, setterFRef,
AssignOrInitInst::Unknown);
}