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:
Joe Groff
2014-01-16 19:08:01 +00:00
parent df35a1251e
commit 0c20833d5f
7 changed files with 213 additions and 51 deletions

View File

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