mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[sil] Add support for cloning unmanaged_autorelease_value from ossa funcs into non-ossa funcs.
This commit is contained in:
@@ -1701,6 +1701,13 @@ template <typename ImplClass>
|
||||
void SILCloner<ImplClass>::visitUnmanagedAutoreleaseValueInst(
|
||||
UnmanagedAutoreleaseValueInst *Inst) {
|
||||
getBuilder().setCurrentDebugScope(getOpScope(Inst->getDebugScope()));
|
||||
if (!getBuilder().hasOwnership()) {
|
||||
return recordClonedInstruction(Inst, getBuilder().createAutoreleaseValue(
|
||||
getOpLocation(Inst->getLoc()),
|
||||
getOpValue(Inst->getOperand()),
|
||||
Inst->getAtomicity()));
|
||||
}
|
||||
|
||||
recordClonedInstruction(Inst, getBuilder().createUnmanagedAutoreleaseValue(
|
||||
getOpLocation(Inst->getLoc()),
|
||||
getOpValue(Inst->getOperand()),
|
||||
|
||||
Reference in New Issue
Block a user