22
22
// it causes importing the "Darwin"/"Glibc" overlay module. That violates
23
23
// layering. i.e. Darwin overlay is created by Swift compiler.
24
24
25
+ #define SWIFT_NAME (NAME ) __attribute__((swift_name(NAME)))
26
+
25
27
SWIFT_BEGIN_NULLABILITY_ANNOTATIONS
26
28
SWIFT_BEGIN_ASSUME_NONNULL
27
29
@@ -256,13 +258,18 @@ BridgedIdentifier ASTContext_getIdentifier(BridgedASTContext cContext,
256
258
_Bool ASTContext_langOptsHasFeature (BridgedASTContext cContext ,
257
259
BridgedFeature feature );
258
260
261
+ SWIFT_NAME ("TopLevelCodeDecl_createStmt(astContext:declContext:startLoc:"
262
+ "statement:endLoc:)" )
259
263
void * TopLevelCodeDecl_createStmt (BridgedASTContext cContext ,
260
264
BridgedDeclContext cDeclContext ,
261
- BridgedSourceLoc cStartLoc , void * element ,
265
+ BridgedSourceLoc cStartLoc , void * statement ,
262
266
BridgedSourceLoc cEndLoc );
267
+
268
+ SWIFT_NAME ("TopLevelCodeDecl_createExpr(astContext:declContext:startLoc:"
269
+ "expression:endLoc:)" )
263
270
void * TopLevelCodeDecl_createExpr (BridgedASTContext cContext ,
264
271
BridgedDeclContext cDeclContext ,
265
- BridgedSourceLoc cStartLoc , void * element ,
272
+ BridgedSourceLoc cStartLoc , void * expression ,
266
273
BridgedSourceLoc cEndLoc );
267
274
268
275
void * ReturnStmt_create (BridgedASTContext cContext , BridgedSourceLoc cLoc ,
@@ -288,13 +295,16 @@ void *IntegerLiteralExpr_create(BridgedASTContext cContext, BridgedString cStr,
288
295
void * BooleanLiteralExpr_create (BridgedASTContext cContext , _Bool value ,
289
296
BridgedSourceLoc cTokenLoc );
290
297
298
+ SWIFT_NAME ("NilLiteralExpr_create(astContext:nilKeywordLoc:)" )
291
299
void * NilLiteralExpr_create (BridgedASTContext cContext ,
292
300
BridgedSourceLoc cNilKeywordLoc );
293
301
294
302
void * ArrayExpr_create (BridgedASTContext cContext , BridgedSourceLoc cLLoc ,
295
303
BridgedArrayRef elements , BridgedArrayRef commas ,
296
304
BridgedSourceLoc cRLoc );
297
305
306
+ SWIFT_NAME ("VarDecl_create(astContext:declContext:bindingKeywordLoc:nameExpr:"
307
+ "initializer:isStatic:isLet:)" )
298
308
void * VarDecl_create (BridgedASTContext cContext ,
299
309
BridgedDeclContext cDeclContext ,
300
310
BridgedSourceLoc cBindingKeywordLoc , void * opaqueNameExpr ,
@@ -313,15 +323,21 @@ void *BraceStmt_create(BridgedASTContext cContext, BridgedSourceLoc cLBLoc,
313
323
314
324
BridgedSourceLoc SourceLoc_advanced (BridgedSourceLoc cLoc , SwiftInt len );
315
325
326
+ SWIFT_NAME ("ParamDecl_create(astContext:declContext:specifierLoc:firstName:"
327
+ "firstNameLoc:secondName:secondNameLoc:type:defaultValue:)" )
316
328
void *
317
329
ParamDecl_create (BridgedASTContext cContext , BridgedDeclContext cDeclContext ,
318
330
BridgedSourceLoc cSpecifierLoc , BridgedIdentifier cFirstName ,
319
331
BridgedSourceLoc cFirstNameLoc , BridgedIdentifier cSecondName ,
320
332
BridgedSourceLoc cSecondNameLoc , void * _Nullable opaqueType ,
321
333
void * _Nullable opaqueDefaultValue );
322
334
335
+ SWIFT_NAME ("AbstractFunctionDecl_setBody(_:ofDecl:)" )
323
336
void AbstractFunctionDecl_setBody (void * opaqueBody , void * opaqueDecl );
324
337
338
+ SWIFT_NAME ("FuncDecl_create(astContext:declContext:staticLoc:funcKeywordLoc:"
339
+ "name:nameLoc:genericParamList:parameterList:asyncSpecifierLoc:"
340
+ "throwsSpecifierLoc:returnType:genericWhereClause:)" )
325
341
struct BridgedDeclContextAndDecl
326
342
FuncDecl_create (BridgedASTContext cContext , BridgedDeclContext cDeclContext ,
327
343
BridgedSourceLoc cStaticLoc , BridgedSourceLoc cFuncKeywordLoc ,
@@ -331,13 +347,17 @@ FuncDecl_create(BridgedASTContext cContext, BridgedDeclContext cDeclContext,
331
347
BridgedSourceLoc cThrowsLoc , void * _Nullable opaqueReturnType ,
332
348
void * _Nullable opaqueGenericWhereClause );
333
349
350
+ SWIFT_NAME ("ConstructorDecl_create(astContext:declContext:initKeywordLoc:"
351
+ "failabilityMarkLoc:isIUO:genericParamList:parameterList:"
352
+ "asyncSpecifierLoc:throwsSpecifierLoc:genericWhereClause:)" )
334
353
BridgedDeclContextAndDecl ConstructorDecl_create (
335
354
BridgedASTContext cContext , BridgedDeclContext cDeclContext ,
336
355
BridgedSourceLoc cInitKeywordLoc , BridgedSourceLoc cFailabilityMarkLoc ,
337
356
_Bool isIUO , void * _Nullable opaqueGenericParams , void * opaqueParameterList ,
338
357
BridgedSourceLoc cAsyncLoc , BridgedSourceLoc cThrowsLoc ,
339
358
void * _Nullable opaqueGenericWhereClause );
340
359
360
+ SWIFT_NAME ("DestructorDecl_create(astContext:declContext:deinitKeywordLoc:)" )
341
361
BridgedDeclContextAndDecl
342
362
DestructorDecl_create (BridgedASTContext cContext ,
343
363
BridgedDeclContext cDeclContext ,
@@ -353,6 +373,9 @@ void *UnresolvedDotExpr_create(BridgedASTContext cContext, void *base,
353
373
void * ClosureExpr_create (BridgedASTContext cContext , void * body ,
354
374
BridgedDeclContext cDeclContext );
355
375
376
+ SWIFT_NAME (
377
+ "TypeAliasDecl_create(astContext:declContext:typealiasKeywordLoc:name:"
378
+ "nameLoc:genericParamList:equalLoc:underlyingType:genericWhereClause:)" )
356
379
void * TypeAliasDecl_create (BridgedASTContext cContext ,
357
380
BridgedDeclContext cDeclContext ,
358
381
BridgedSourceLoc cAliasKeywordLoc ,
@@ -362,48 +385,66 @@ void *TypeAliasDecl_create(BridgedASTContext cContext,
362
385
void * opaqueUnderlyingType ,
363
386
void * _Nullable opaqueGenericWhereClause );
364
387
388
+ SWIFT_NAME ("IterableDeclContext_setParsedMembers(_:ofDecl:)" )
365
389
void IterableDeclContext_setParsedMembers (BridgedArrayRef members ,
366
390
void * opaqueDecl );
367
391
392
+ SWIFT_NAME ("EnumDecl_create(astContext:declContext:enumKeywordLoc:name:nameLoc:"
393
+ "genericParamList:inheritedTypes:genericWhereClause:braceRange:)" )
368
394
BridgedDeclContextAndDecl EnumDecl_create (
369
395
BridgedASTContext cContext , BridgedDeclContext cDeclContext ,
370
396
BridgedSourceLoc cEnumKeywordLoc , BridgedIdentifier cName ,
371
397
BridgedSourceLoc cNameLoc , void * _Nullable opaqueGenericParamList ,
372
398
BridgedArrayRef cInheritedTypes , void * _Nullable opaqueGenericWhereClause ,
373
399
BridgedSourceRange cBraceRange );
374
400
401
+ SWIFT_NAME ("EnumCaseDecl_create(declContext:caseKeywordLoc:elements:)" )
375
402
void * EnumCaseDecl_create (BridgedDeclContext cDeclContext ,
376
403
BridgedSourceLoc cCaseKeywordLoc ,
377
404
BridgedArrayRef cElements );
378
405
406
+ SWIFT_NAME ("EnumElementDecl_create(astContext:declContext:name:nameLoc:"
407
+ "parameterList:equalsLoc:rawValue:)" )
379
408
void * EnumElementDecl_create (BridgedASTContext cContext ,
380
409
BridgedDeclContext cDeclContext ,
381
410
BridgedIdentifier cName , BridgedSourceLoc cNameLoc ,
382
411
void * _Nullable opaqueParameterList ,
383
412
BridgedSourceLoc cEqualsLoc ,
384
413
void * _Nullable opaqueRawValue );
385
414
415
+ SWIFT_NAME (
416
+ "StructDecl_create(astContext:declContext:structKeywordLoc:name:nameLoc:"
417
+ "genericParamList:inheritedTypes:genericWhereClause:braceRange:)" )
386
418
BridgedDeclContextAndDecl StructDecl_create (
387
419
BridgedASTContext cContext , BridgedDeclContext cDeclContext ,
388
420
BridgedSourceLoc cStructKeywordLoc , BridgedIdentifier cName ,
389
421
BridgedSourceLoc cNameLoc , void * _Nullable opaqueGenericParamList ,
390
422
BridgedArrayRef cInheritedTypes , void * _Nullable opaqueGenericWhereClause ,
391
423
BridgedSourceRange cBraceRange );
392
424
425
+ SWIFT_NAME (
426
+ "ClassDecl_create(astContext:declContext:classKeywordLoc:name:nameLoc:"
427
+ "genericParamList:inheritedTypes:genericWhereClause:braceRange:isActor:)" )
393
428
BridgedDeclContextAndDecl ClassDecl_create (
394
429
BridgedASTContext cContext , BridgedDeclContext cDeclContext ,
395
430
BridgedSourceLoc cClassKeywordLoc , BridgedIdentifier cName ,
396
431
BridgedSourceLoc cNameLoc , void * _Nullable opaqueGenericParamList ,
397
432
BridgedArrayRef cInheritedTypes , void * _Nullable opaqueGenericWhereClause ,
398
433
BridgedSourceRange cBraceRange , _Bool isActor );
399
434
435
+ SWIFT_NAME ("ProtocolDecl_create(astContext:declContext:protocolKeywordLoc:name:"
436
+ "nameLoc:primaryAssociatedTypeNames:inheritedTypes:"
437
+ "genericWhereClause:braceRange:)" )
400
438
BridgedDeclContextAndDecl ProtocolDecl_create (
401
439
BridgedASTContext cContext , BridgedDeclContext cDeclContext ,
402
440
BridgedSourceLoc cProtocolKeywordLoc , BridgedIdentifier cName ,
403
441
BridgedSourceLoc cNameLoc , BridgedArrayRef cPrimaryAssociatedTypeNames ,
404
442
BridgedArrayRef cInheritedTypes , void * _Nullable opaqueGenericWhereClause ,
405
443
BridgedSourceRange cBraceRange );
406
444
445
+ SWIFT_NAME (
446
+ "AssociatedTypeDecl_create(astContext:declContext:associatedtypeKeywordLoc:"
447
+ "name:nameLoc:inheritedTypes:defaultType:genericWhereClause:)" )
407
448
void * AssociatedTypeDecl_create (BridgedASTContext cContext ,
408
449
BridgedDeclContext cDeclContext ,
409
450
BridgedSourceLoc cAssociatedtypeKeywordLoc ,
@@ -413,6 +454,8 @@ void *AssociatedTypeDecl_create(BridgedASTContext cContext,
413
454
void * _Nullable opaqueDefaultType ,
414
455
void * _Nullable opaqueGenericWhereClause );
415
456
457
+ SWIFT_NAME ("ExtensionDecl_create(astContext:declContext:extensionKeywordLoc:"
458
+ "extendedType:inheritedTypes:genericWhereClause:braceRange:)" )
416
459
BridgedDeclContextAndDecl ExtensionDecl_create (
417
460
BridgedASTContext cContext , BridgedDeclContext cDeclContext ,
418
461
BridgedSourceLoc cExtensionKeywordLoc , void * opaqueExtendedType ,
@@ -425,6 +468,9 @@ typedef enum ENUM_EXTENSIBILITY_ATTR(open) {
425
468
BridgedOperatorFixityPostfix ,
426
469
} BridgedOperatorFixity ;
427
470
471
+ SWIFT_NAME (
472
+ "OperatorDecl_create(astContext:declContext:fixity:operatorKeywordLoc:name:"
473
+ "nameLoc:colonLoc:precedenceGroupName:PrecedenceGroupLoc:)" )
428
474
void * OperatorDecl_create (BridgedASTContext cContext ,
429
475
BridgedDeclContext cDeclContext ,
430
476
BridgedOperatorFixity cFixity ,
@@ -440,6 +486,11 @@ typedef enum ENUM_EXTENSIBILITY_ATTR(open) {
440
486
BridgedAssociativityRight ,
441
487
} BridgedAssociativity ;
442
488
489
+ SWIFT_NAME ("PrecedenceGroupDecl_create(declContext:precedencegroupKeywordLoc:"
490
+ "name:nameLoc:leftBraceLoc:associativityLabelLoc:"
491
+ "associativityValueLoc:associativity:assignmentLabelLoc:"
492
+ "assignmentValueLoc:isAssignment:higherThanKeywordLoc:"
493
+ "higherThanNames:lowerThanKeywordLoc:lowerThanNames:rightBraceLoc:)" )
443
494
void * PrecedenceGroupDecl_create (
444
495
BridgedDeclContext cDeclContext ,
445
496
BridgedSourceLoc cPrecedencegroupKeywordLoc , BridgedIdentifier cName ,
@@ -463,19 +514,25 @@ typedef enum ENUM_EXTENSIBILITY_ATTR(open) {
463
514
BridgedImportKindFunc ,
464
515
} BridgedImportKind ;
465
516
517
+ SWIFT_NAME ("ImportDecl_create(astContext:declContext:importKeywordLoc:"
518
+ "importKind:importKindLoc:path:)" )
466
519
void * ImportDecl_create (BridgedASTContext cContext ,
467
520
BridgedDeclContext cDeclContext ,
468
521
BridgedSourceLoc cImportKeywordLoc ,
469
522
BridgedImportKind cImportKind ,
470
523
BridgedSourceLoc cImportKindLoc ,
471
524
BridgedArrayRef cImportPathElements );
472
525
526
+ SWIFT_NAME ("GenericParamList_create(astContext:leftAngleLoc:parameters:"
527
+ "genericWhereClause:rightAngleLoc:)" )
473
528
void * GenericParamList_create (BridgedASTContext cContext ,
474
529
BridgedSourceLoc cLeftAngleLoc ,
475
530
BridgedArrayRef cParameters ,
476
531
void * _Nullable opaqueGenericWhereClause ,
477
532
BridgedSourceLoc cRightAngleLoc );
478
533
534
+ SWIFT_NAME ("GenericTypeParamDecl_create(astContext:declContext:eachKeywordLoc:"
535
+ "name:nameLoc:inheritedType:index:)" )
479
536
void * GenericTypeParamDecl_create (BridgedASTContext cContext ,
480
537
BridgedDeclContext cDeclContext ,
481
538
BridgedSourceLoc cEachLoc ,
@@ -484,10 +541,14 @@ void *GenericTypeParamDecl_create(BridgedASTContext cContext,
484
541
void * _Nullable opaqueInheritedType ,
485
542
SwiftInt index );
486
543
544
+ SWIFT_NAME (
545
+ "TrailingWhereClause_create(astContext:whereKeywordLoc:requirements:)" )
487
546
void * TrailingWhereClause_create (BridgedASTContext cContext ,
488
547
BridgedSourceLoc cWhereKeywordLoc ,
489
548
BridgedArrayRef cRequirements );
490
549
550
+ SWIFT_NAME (
551
+ "ParameterList_create(astContext:leftParenLoc:parameters:rightParenLoc:)" )
491
552
void * ParameterList_create (BridgedASTContext cContext ,
492
553
BridgedSourceLoc cLeftParenLoc ,
493
554
BridgedArrayRef cParameters ,
@@ -600,4 +661,6 @@ _Bool Plugin_waitForNextMessage(PluginHandle handle, BridgedData *data);
600
661
SWIFT_END_ASSUME_NONNULL
601
662
SWIFT_END_NULLABILITY_ANNOTATIONS
602
663
664
+ #undef SWIFT_NAME
665
+
603
666
#endif // SWIFT_C_AST_ASTBRIDGING_H
0 commit comments