@@ -149,6 +149,10 @@ swift_reflection_interop_projectExistential(SwiftReflectionInteropContextRef Con
149
149
swift_typeref_interop_t *OutInstanceTypeRef,
150
150
swift_addr_t *OutStartOfInstanceData);
151
151
152
+ static inline int swift_reflection_interop_projectEnum (
153
+ SwiftReflectionInteropContextRef ContextRef, swift_addr_t EnumAddress,
154
+ swift_typeref_interop_t EnumTypeRef, int *CaseIndex);
155
+
152
156
static inline void
153
157
swift_reflection_interop_dumpTypeRef (SwiftReflectionInteropContextRef ContextRef,
154
158
swift_typeref_interop_t OpaqueTypeRef);
@@ -289,6 +293,10 @@ struct SwiftReflectionFunctions {
289
293
swift_typeref_t *OutInstanceTypeRef,
290
294
swift_addr_t *OutStartOfInstanceData);
291
295
296
+ int (*projectEnumValue)(SwiftReflectionContextRef ContextRef,
297
+ swift_addr_t EnumAddress, swift_typeref_t EnumTypeRef,
298
+ int *CaseIndex);
299
+
292
300
void (*dumpTypeRef)(swift_typeref_t OpaqueTypeRef);
293
301
294
302
void (*dumpInfoForTypeRef)(SwiftReflectionContextRef ContextRef,
@@ -482,6 +490,7 @@ swift_reflection_interop_loadFunctions(struct SwiftReflectionInteropContext *Con
482
490
LOAD (genericArgumentCountOfTypeRef);
483
491
LOAD (genericArgumentOfTypeRef);
484
492
LOAD (projectExistential);
493
+ LOAD_OPT (projectEnumValue);
485
494
LOAD (dumpTypeRef);
486
495
LOAD (dumpInfoForTypeRef);
487
496
@@ -1113,6 +1122,15 @@ swift_reflection_interop_projectExistential(SwiftReflectionInteropContextRef Con
1113
1122
return 1 ;
1114
1123
}
1115
1124
1125
+ static inline int swift_reflection_interop_projectEnumValue (
1126
+ SwiftReflectionInteropContextRef ContextRef, swift_addr_t EnumAddress,
1127
+ swift_typeref_interop_t EnumTypeRef, int *CaseIndex) {
1128
+ DECLARE_LIBRARY (EnumTypeRef.Library );
1129
+ return Library->Functions .projectEnumValue &&
1130
+ Library->Functions .projectEnumValue (Library->Context , EnumAddress,
1131
+ EnumTypeRef.Typeref , CaseIndex);
1132
+ }
1133
+
1116
1134
static inline void
1117
1135
swift_reflection_interop_dumpTypeRef (SwiftReflectionInteropContextRef ContextRef,
1118
1136
swift_typeref_interop_t OpaqueTypeRef) {
0 commit comments