mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
SwiftCompilerSources: move SIL-related Context APIs from Optimizer to the SIL module
This commit is contained in:
@@ -53,7 +53,12 @@ extension ForwardingInstruction {
|
||||
public var forwardingOwnership: Ownership {
|
||||
Ownership(bridged: bridged.ForwardingInst_forwardingOwnership())
|
||||
}
|
||||
|
||||
|
||||
public func setForwardingOwnership(to ownership: Ownership, _ context: some MutatingContext) {
|
||||
context.notifyInstructionsChanged()
|
||||
bridged.ForwardingInst_setForwardingOwnership(ownership._bridged)
|
||||
}
|
||||
|
||||
/// A forwarding instruction preserves reference counts if it has a dynamically non-trivial result in which all references are forwarded from the operand.
|
||||
///
|
||||
/// A cast can only forward guaranteed values if it preserves reference counts. Such casts cannot release any references within their operand's value and cannot retain any references owned by their result.
|
||||
|
||||
Reference in New Issue
Block a user