Skip to content

Commit c05044c

Browse files
committed
Add MarkDependenceInst.settleToEscaping
This allows emitting mark_dependence [unresolved] in some cases even if the diagnostics can't currently handle them.
1 parent 7255c41 commit c05044c

File tree

3 files changed

+9
-0
lines changed

3 files changed

+9
-0
lines changed

SwiftCompilerSources/Sources/SIL/Instruction.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -976,6 +976,10 @@ class MarkDependenceInst : SingleValueInstruction {
976976
public func resolveToNonEscaping() {
977977
bridged.MarkDependenceInst_resolveToNonEscaping()
978978
}
979+
980+
public func settleToEscaping() {
981+
bridged.MarkDependenceInst_settleToEscaping()
982+
}
979983
}
980984

981985
final public class RefToBridgeObjectInst : SingleValueInstruction {

include/swift/SIL/SILBridging.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -788,6 +788,7 @@ struct BridgedInstruction {
788788
BRIDGED_INLINE SwiftInt AssignInst_getAssignOwnership() const;
789789
BRIDGED_INLINE MarkDependenceKind MarkDependenceInst_dependenceKind() const;
790790
BRIDGED_INLINE void MarkDependenceInst_resolveToNonEscaping() const;
791+
BRIDGED_INLINE void MarkDependenceInst_settleToEscaping() const;
791792
BRIDGED_INLINE SwiftInt BeginAccessInst_getAccessKind() const;
792793
BRIDGED_INLINE bool BeginAccessInst_isStatic() const;
793794
BRIDGED_INLINE bool BeginAccessInst_isUnsafe() const;

include/swift/SIL/SILBridgingImpl.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1387,6 +1387,10 @@ void BridgedInstruction::MarkDependenceInst_resolveToNonEscaping() const {
13871387
getAs<swift::MarkDependenceInst>()->resolveToNonEscaping();
13881388
}
13891389

1390+
void BridgedInstruction::MarkDependenceInst_settleToEscaping() const {
1391+
getAs<swift::MarkDependenceInst>()->settleToEscaping();
1392+
}
1393+
13901394
SwiftInt BridgedInstruction::BeginAccessInst_getAccessKind() const {
13911395
return (SwiftInt)getAs<swift::BeginAccessInst>()->getAccessKind();
13921396
}

0 commit comments

Comments
 (0)