Swift SIL: add Builder.createUncheckedOwnershipConversion

This commit is contained in:
Erik Eckstein
2025-05-02 18:07:57 +02:00
parent bb9829c89c
commit 2f34dae56f
3 changed files with 16 additions and 0 deletions

View File

@@ -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))