mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Add T* syntactic sugar type for UnsafePointer<T>.
This is the basic plumbing for <rdar://problem/16912508>. Swift SVN r18195
This commit is contained in:
@@ -2294,6 +2294,17 @@ void Serializer::writeType(Type ty) {
|
||||
break;
|
||||
}
|
||||
|
||||
case TypeKind::UnsafePointer: {
|
||||
auto ptrTy = cast<UnsafePointerType>(ty.getPointer());
|
||||
|
||||
Type base = ptrTy->getBaseType();
|
||||
|
||||
unsigned abbrCode = DeclTypeAbbrCodes[UnsafePointerTypeLayout::Code];
|
||||
UnsafePointerTypeLayout::emitRecord(Out, ScratchRecord, abbrCode,
|
||||
addTypeRef(base));
|
||||
break;
|
||||
}
|
||||
|
||||
case TypeKind::ProtocolComposition: {
|
||||
auto composition = cast<ProtocolCompositionType>(ty.getPointer());
|
||||
|
||||
@@ -2451,6 +2462,7 @@ void Serializer::writeAllDeclsAndTypes() {
|
||||
registerDeclTypeAbbr<UnboundGenericTypeLayout>();
|
||||
registerDeclTypeAbbr<OptionalTypeLayout>();
|
||||
registerDeclTypeAbbr<ImplicitlyUnwrappedOptionalTypeLayout>();
|
||||
registerDeclTypeAbbr<UnsafePointerTypeLayout>();
|
||||
registerDeclTypeAbbr<DynamicSelfTypeLayout>();
|
||||
registerDeclTypeAbbr<OpenedExistentialTypeLayout>();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user