mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
IRGen: Optimize copy/destroy of ObjC tagged or nullable enums too.
Rename TypeInfo::isSingleRetainablePointer to TypeInfo::isSingleSwiftRetainablePointer, and add an isSingleUnknownRetainablePointer entry point to ask whether a type has any single-refcounted representation, native or not. Use that to provide the same nullable-pointer and pointer-with-tag optimizations for copying and destroying enums with ObjC payloads as we do for Swift class payloads. Swift SVN r12410
This commit is contained in:
@@ -2226,7 +2226,7 @@ void irgen::emitFunctionPartialApplication(IRGenFunction &IGF,
|
||||
continue;
|
||||
}
|
||||
|
||||
if (ti.isSingleRetainablePointer(ResilienceScope::Local))
|
||||
if (ti.isSingleSwiftRetainablePointer(ResilienceScope::Local))
|
||||
hasSingleSwiftRefcountedContext = Yes;
|
||||
else
|
||||
hasSingleSwiftRefcountedContext = No;
|
||||
|
||||
Reference in New Issue
Block a user