mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Swift SIL: add Builder.createUncheckedOwnershipConversion
This commit is contained in:
@@ -215,6 +215,13 @@ public struct Builder {
|
||||
return notifyNew(cast.getAs(UnconditionalCheckedCastAddrInst.self))
|
||||
}
|
||||
|
||||
public func createUncheckedOwnershipConversion(
|
||||
operand: Value, resultOwnership: Ownership
|
||||
) -> UncheckedOwnershipConversionInst {
|
||||
let uoc = bridged.createUncheckedOwnershipConversion(operand.bridged, resultOwnership._bridged)
|
||||
return notifyNew(uoc.getAs(UncheckedOwnershipConversionInst.self))
|
||||
}
|
||||
|
||||
public func createLoad(fromAddress: Value, ownership: LoadInst.LoadOwnership) -> LoadInst {
|
||||
let load = bridged.createLoad(fromAddress.bridged, ownership.rawValue)
|
||||
return notifyNew(load.getAs(LoadInst.self))
|
||||
|
||||
Reference in New Issue
Block a user