mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
This is part of a series of commits to remove reference forwarding for
some of the ARC entry points. rdar://22724641. After this commit, swift_retain_noresult will be completely replaced by swift_retain. LLVMARCOpts pass is modified NOT to rewrite swift_retain to swift_retain_noresult which forward no reference. Swift SVN r32082
This commit is contained in:
@@ -941,7 +941,7 @@ static bool _dynamicCastToExistential(OpaqueValue *dest,
|
||||
auto object = *(reinterpret_cast<HeapObject**>(srcDynamicValue));
|
||||
destExistential->Value = object;
|
||||
if (!canTake || !(flags & DynamicCastFlags::TakeOnSuccess)) {
|
||||
swift_retain_noresult(object);
|
||||
swift_retain(object);
|
||||
}
|
||||
maybeDeallocateSourceAfterSuccess();
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user