@@ -112,6 +112,70 @@ typedef enum ENUM_EXTENSIBILITY_ATTR(open) BridgedMacroDefinitionKind : long {
112
112
BridgedBuiltinExternalMacro
113
113
} BridgedMacroDefinitionKind ;
114
114
115
+ /// Bridged parameter specifiers
116
+ typedef enum ENUM_EXTENSIBILITY_ATTR (open ) BridgedAttributedTypeSpecifier : long {
117
+ BridgedAttributedTypeSpecifierInOut ,
118
+ BridgedAttributedTypeSpecifierBorrowing ,
119
+ BridgedAttributedTypeSpecifierConsuming ,
120
+ BridgedAttributedTypeSpecifierLegacyShared ,
121
+ BridgedAttributedTypeSpecifierLegacyOwned ,
122
+ BridgedAttributedTypeSpecifierConst ,
123
+ BridgedAttributedTypeSpecifierIsolated ,
124
+ } BridgedAttributedTypeSpecifier ;
125
+
126
+
127
+ // Bridged type attribute kinds, which mirror TypeAttrKind exactly.
128
+ typedef enum ENUM_EXTENSIBILITY_ATTR (closed ) BridgedTypeAttrKind : long {
129
+ BridgedTypeAttrKind_autoclosure ,
130
+ BridgedTypeAttrKind_convention ,
131
+ BridgedTypeAttrKind_noescape ,
132
+ BridgedTypeAttrKind_escaping ,
133
+ BridgedTypeAttrKind_differentiable ,
134
+ BridgedTypeAttrKind_noDerivative ,
135
+ BridgedTypeAttrKind_async ,
136
+ BridgedTypeAttrKind_Sendable ,
137
+ BridgedTypeAttrKind_unchecked ,
138
+ BridgedTypeAttrKind__local ,
139
+ BridgedTypeAttrKind__noMetadata ,
140
+ BridgedTypeAttrKind__opaqueReturnTypeOf ,
141
+ BridgedTypeAttrKind_block_storage ,
142
+ BridgedTypeAttrKind_box ,
143
+ BridgedTypeAttrKind_dynamic_self ,
144
+ BridgedTypeAttrKind_sil_weak ,
145
+ BridgedTypeAttrKind_sil_unowned ,
146
+ BridgedTypeAttrKind_sil_unmanaged ,
147
+ BridgedTypeAttrKind_error ,
148
+ BridgedTypeAttrKind_out ,
149
+ BridgedTypeAttrKind_direct ,
150
+ BridgedTypeAttrKind_in ,
151
+ BridgedTypeAttrKind_inout ,
152
+ BridgedTypeAttrKind_inout_aliasable ,
153
+ BridgedTypeAttrKind_in_guaranteed ,
154
+ BridgedTypeAttrKind_in_constant ,
155
+ BridgedTypeAttrKind_pack_owned ,
156
+ BridgedTypeAttrKind_pack_guaranteed ,
157
+ BridgedTypeAttrKind_pack_inout ,
158
+ BridgedTypeAttrKind_pack_out ,
159
+ BridgedTypeAttrKind_owned ,
160
+ BridgedTypeAttrKind_unowned_inner_pointer ,
161
+ BridgedTypeAttrKind_guaranteed ,
162
+ BridgedTypeAttrKind_autoreleased ,
163
+ BridgedTypeAttrKind_callee_owned ,
164
+ BridgedTypeAttrKind_callee_guaranteed ,
165
+ BridgedTypeAttrKind_objc_metatype ,
166
+ BridgedTypeAttrKind_opened ,
167
+ BridgedTypeAttrKind_pack_element ,
168
+ BridgedTypeAttrKind_pseudogeneric ,
169
+ BridgedTypeAttrKind_yields ,
170
+ BridgedTypeAttrKind_yield_once ,
171
+ BridgedTypeAttrKind_yield_many ,
172
+ BridgedTypeAttrKind_captures_generics ,
173
+ BridgedTypeAttrKind_moveOnly ,
174
+ BridgedTypeAttrKind_thin ,
175
+ BridgedTypeAttrKind_thick ,
176
+ BridgedTypeAttrKind_Count
177
+ } BridgedTypeAttrKind ;
178
+
115
179
#ifdef __cplusplus
116
180
extern "C" {
117
181
@@ -261,6 +325,19 @@ void *ImplicitlyUnwrappedOptionalTypeRepr_create(void *ctx, void *base,
261
325
void * exclamationLoc );
262
326
void * MetatypeTypeRepr_create (void * ctx , void * baseType , void * typeLoc );
263
327
void * ProtocolTypeRepr_create (void * ctx , void * baseType , void * protoLoc );
328
+
329
+ BridgedTypeAttrKind getBridgedTypeAttrKindFromString (
330
+ const unsigned char * _Nullable str , long len );
331
+
332
+ typedef void * BridgedTypeAttributes ;
333
+ BridgedTypeAttributes BridgedTypeAttributes_create (void );
334
+ void BridgedTypeAttributes_addSimpleAttr (
335
+ BridgedTypeAttributes typeAttributes , BridgedTypeAttrKind kind , void * atLoc , void * attrLoc );
336
+ void * AttributedTypeRepr_create (void * ctx , void * base , BridgedTypeAttributes typeAttributes );
337
+
338
+ void * AttributedTypeSpecifierRepr_create (
339
+ void * ctx , void * base , BridgedAttributedTypeSpecifier specifier , void * specifierLoc );
340
+ void * VarargTypeRepr_create (void * ctx , void * base , void * ellipsisLocPtr );
264
341
void * PackExpansionTypeRepr_create (void * ctx , void * base , void * repeatLoc );
265
342
void * TupleTypeRepr_create (void * ctx , BridgedArrayRef elements , void * lParenLoc ,
266
343
void * rParenLoc );
@@ -269,8 +346,9 @@ void *MemberTypeRepr_create(void *ctx, void *baseComponent,
269
346
void * GenericIdentTypeRepr_create (void * ctx , BridgedIdentifier name ,
270
347
void * nameLoc , BridgedArrayRef genericArgs ,
271
348
void * lAngle , void * rAngle );
349
+ void * EmptyCompositionTypeRepr_create (void * ctx , void * anyLoc );
272
350
void * CompositionTypeRepr_create (void * ctx , BridgedArrayRef types ,
273
- void * firstTypeLoc );
351
+ void * firstTypeLoc , void * firstAmpLoc );
274
352
void * FunctionTypeRepr_create (void * ctx , void * argsTy , void * _Nullable asyncLoc ,
275
353
void * _Nullable throwsLoc , void * arrowLoc ,
276
354
void * returnType );
0 commit comments