@@ -48,6 +48,7 @@ class Fingerprint;
48
48
class Identifier ;
49
49
class IfConfigClauseRangeInfo ;
50
50
struct LabeledStmtInfo ;
51
+ struct LifetimeDescriptor ;
51
52
enum class MacroRole : uint32_t ;
52
53
class MacroIntroducedDeclName ;
53
54
enum class MacroIntroducedDeclNameKind ;
@@ -964,6 +965,79 @@ BridgedInlineAttr BridgedInlineAttr_createParsed(BridgedASTContext cContext,
964
965
BridgedSourceRange cRange,
965
966
BridgedInlineKind cKind);
966
967
968
+ enum ENUM_EXTENSIBILITY_ATTR (closed) BridgedParsedLifetimeDependenceKind {
969
+ BridgedParsedLifetimeDependenceKindDefault,
970
+ BridgedParsedLifetimeDependenceKindScope,
971
+ BridgedParsedLifetimeDependenceKindInherit,
972
+ };
973
+
974
+ class BridgedLifetimeDescriptor {
975
+ union Value {
976
+ BridgedIdentifier name;
977
+ unsigned index ;
978
+
979
+ Value (BridgedIdentifier name) : name (name) {}
980
+ Value (unsigned index ) : index (index ) {}
981
+ Value () : name () {}
982
+ } value;
983
+
984
+ enum DescriptorKind {
985
+ Named,
986
+ Ordered,
987
+ Self,
988
+ } kind;
989
+
990
+ BridgedParsedLifetimeDependenceKind dependenceKind;
991
+ BridgedSourceLoc loc;
992
+
993
+ BridgedLifetimeDescriptor (Value value, DescriptorKind kind,
994
+ BridgedParsedLifetimeDependenceKind dependenceKind,
995
+ BridgedSourceLoc loc)
996
+ : value(value), kind(kind), dependenceKind(dependenceKind), loc(loc) {}
997
+
998
+ public:
999
+ SWIFT_NAME (" forNamed(_:dependenceKind:loc:)" )
1000
+ static BridgedLifetimeDescriptor
1001
+ forNamed (BridgedIdentifier name,
1002
+ BridgedParsedLifetimeDependenceKind dependenceKind,
1003
+ BridgedSourceLoc loc) {
1004
+ return BridgedLifetimeDescriptor (name, DescriptorKind::Named,
1005
+ dependenceKind, loc);
1006
+ }
1007
+ SWIFT_NAME (" forOrdered(_:dependenceKind:loc:)" )
1008
+ static BridgedLifetimeDescriptor
1009
+ forOrdered (size_t index, BridgedParsedLifetimeDependenceKind dependenceKind,
1010
+ BridgedSourceLoc loc) {
1011
+ return BridgedLifetimeDescriptor (index , DescriptorKind::Ordered,
1012
+ dependenceKind, loc);
1013
+ }
1014
+ SWIFT_NAME (" forSelf(dependenceKind:loc:)" )
1015
+ static BridgedLifetimeDescriptor
1016
+ forSelf (BridgedParsedLifetimeDependenceKind dependenceKind,
1017
+ BridgedSourceLoc loc) {
1018
+ return BridgedLifetimeDescriptor ({}, DescriptorKind::Self, dependenceKind,
1019
+ loc);
1020
+ }
1021
+
1022
+ swift::LifetimeDescriptor unbridged ();
1023
+ };
1024
+
1025
+ SWIFT_NAME (" BridgedLifetimeEntry.createParsed(_:range:sources:)" )
1026
+ BridgedLifetimeEntry
1027
+ BridgedLifetimeEntry_createParsed(BridgedASTContext cContext,
1028
+ BridgedSourceRange cRange,
1029
+ BridgedArrayRef cSources);
1030
+
1031
+ SWIFT_NAME (" BridgedLifetimeEntry.createParsed(_:range:sources:target:)" )
1032
+ BridgedLifetimeEntry BridgedLifetimeEntry_createParsed(
1033
+ BridgedASTContext cContext, BridgedSourceRange cRange,
1034
+ BridgedArrayRef cSources, BridgedLifetimeDescriptor cTarget);
1035
+
1036
+ SWIFT_NAME (" BridgedLifetimeAttr.createParsed(_:atLoc:range:entry:)" )
1037
+ BridgedLifetimeAttr BridgedLifetimeAttr_createParsed(
1038
+ BridgedASTContext cContext, BridgedSourceLoc cAtLoc,
1039
+ BridgedSourceRange cRange, BridgedLifetimeEntry cEntry);
1040
+
967
1041
enum ENUM_EXTENSIBILITY_ATTR (closed) BridgedMacroSyntax {
968
1042
BridgedMacroSyntaxFreestanding,
969
1043
BridgedMacroSyntaxAttached,
0 commit comments