mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[semantic-sil] Create unmanaged_autorelease_value.
This is an autorelease for use with Builtin.autorelease that does not need to be balanced as part of the ownership model. rdar://29791263
This commit is contained in:
@@ -3043,6 +3043,18 @@ class UnmanagedReleaseValueInst
|
||||
: UnaryInstructionBase(DebugLoc, operand) {}
|
||||
};
|
||||
|
||||
/// Transfers ownership of a loadable value to the current autorelease
|
||||
/// pool. Unmanaged, so it is ignored from an ownership balancing perspective.
|
||||
class UnmanagedAutoreleaseValueInst
|
||||
: public UnaryInstructionBase<ValueKind::UnmanagedAutoreleaseValueInst,
|
||||
RefCountingInst,
|
||||
/*HasValue*/ false> {
|
||||
friend SILBuilder;
|
||||
|
||||
UnmanagedAutoreleaseValueInst(SILDebugLocation DebugLoc, SILValue operand)
|
||||
: UnaryInstructionBase(DebugLoc, operand) {}
|
||||
};
|
||||
|
||||
/// Transfers ownership of a loadable value to the current autorelease pool.
|
||||
class AutoreleaseValueInst
|
||||
: public UnaryInstructionBase<ValueKind::AutoreleaseValueInst,
|
||||
|
||||
Reference in New Issue
Block a user