@@ -288,6 +288,15 @@ SWIFT_REMOTE_MIRROR_LINKAGE
288
288
size_t swift_reflection_demangle (const char *MangledName, size_t Length,
289
289
char *OutDemangledName, size_t MaxLength);
290
290
291
+ // / Iterate over the process's protocol conformance cache.
292
+ // /
293
+ // / Calls the passed in Call function for each protocol conformance found in
294
+ // / the conformance cache. The function is passed the type which conforms and
295
+ // / the protocol it conforms to. The ContextPtr is passed through unchanged.
296
+ // /
297
+ // / Returns NULL on success. On error, returns a pointer to a C string
298
+ // / describing the error. This pointer remains valid until the next
299
+ // / swift_reflection call on the given context.
291
300
SWIFT_REMOTE_MIRROR_LINKAGE
292
301
const char *swift_reflection_iterateConformanceCache (
293
302
SwiftReflectionContextRef ContextRef,
@@ -296,13 +305,27 @@ const char *swift_reflection_iterateConformanceCache(
296
305
void *ContextPtr),
297
306
void *ContextPtr);
298
307
308
+ // / Iterate over the process's metadata allocations.
309
+ // /
310
+ // / Calls the passed in Call function for each metadata allocation. The function
311
+ // / is passed a structure that describes the allocation. The ContextPtr is
312
+ // / passed through unchanged.
313
+ // /
314
+ // / Returns NULL on success. On error, returns a pointer to a C string
315
+ // / describing the error. This pointer remains valid until the next
316
+ // / swift_reflection call on the given context.
299
317
SWIFT_REMOTE_MIRROR_LINKAGE
300
318
const char *swift_reflection_iterateMetadataAllocations (
301
319
SwiftReflectionContextRef ContextRef,
302
320
void (*Call)(swift_metadata_allocation_t Allocation,
303
321
void *ContextPtr),
304
322
void *ContextPtr);
305
323
324
+ // / Given a metadata allocation, return the metadata it points to. Returns NULL
325
+ // / on failure. Despite the name, not all allocations point to metadata.
326
+ // / Currently, this will return a metadata only for allocations with tag
327
+ // / SWIFT_GENERIC_METADATA_CACHE_ALLOCATION. Support for additional tags may be
328
+ // / added in the future. The caller must gracefully handle failure.
306
329
SWIFT_REMOTE_MIRROR_LINKAGE
307
330
swift_reflection_ptr_t swift_reflection_allocationMetadataPointer (
308
331
SwiftReflectionContextRef ContextRef,
0 commit comments