File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -1893,6 +1893,7 @@ static bool isScratchBuffer(SILValue value) {
1893
1893
1894
1894
bool swift::memInstMustInitialize (Operand *memOper) {
1895
1895
SILValue address = memOper->get ();
1896
+
1896
1897
SILInstruction *memInst = memOper->getUser ();
1897
1898
1898
1899
switch (memInst->getKind ()) {
@@ -1908,6 +1909,12 @@ bool swift::memInstMustInitialize(Operand *memOper) {
1908
1909
case SILInstructionKind::InjectEnumAddrInst:
1909
1910
return true ;
1910
1911
1912
+ case SILInstructionKind::BeginApplyInst:
1913
+ case SILInstructionKind::TryApplyInst:
1914
+ case SILInstructionKind::ApplyInst: {
1915
+ FullApplySite applySite (memInst);
1916
+ return applySite.isIndirectResultOperand (*memOper);
1917
+ }
1911
1918
case SILInstructionKind::StoreInst:
1912
1919
return cast<StoreInst>(memInst)->getOwnershipQualifier ()
1913
1920
== StoreOwnershipQualifier::Init;
You can’t perform that action at this time.
0 commit comments