mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Swift SIL: add some instruction classes and APIs
* add `UnownedRetainInst` and `UnownedReleaseInst` * add `var value` to `RetainValueInst` and `ReleaseValueInst` * make the protocol `UnaryInstruction` be an `Instruction` * add `var Type.isValueTypeWithDeinit` * add `var Type.isUnownedStorageType` * add `var OperandArray.values`
This commit is contained in:
@@ -136,6 +136,18 @@ public struct Builder {
|
||||
return notifyNew(release.getAs(StrongReleaseInst.self))
|
||||
}
|
||||
|
||||
@discardableResult
|
||||
public func createUnownedRetain(operand: Value) -> UnownedRetainInst {
|
||||
let retain = bridged.createUnownedRetain(operand.bridged)
|
||||
return notifyNew(retain.getAs(UnownedRetainInst.self))
|
||||
}
|
||||
|
||||
@discardableResult
|
||||
public func createUnownedRelease(operand: Value) -> UnownedReleaseInst {
|
||||
let release = bridged.createUnownedRelease(operand.bridged)
|
||||
return notifyNew(release.getAs(UnownedReleaseInst.self))
|
||||
}
|
||||
|
||||
public func createFunctionRef(_ function: Function) -> FunctionRefInst {
|
||||
let functionRef = bridged.createFunctionRef(function.bridged)
|
||||
return notifyNew(functionRef.getAs(FunctionRefInst.self))
|
||||
|
||||
Reference in New Issue
Block a user