Repository: apple/swift
File: include/swift/Runtime/Metadata.h (C/C++)

Code before:
/// type, AnyObject.
SWIFT_RUNTIME_EXPORT
const
  FullMetadata<ExistentialTypeMetadata> METADATA_SYM(ANYOBJECT_MANGLING);


/// True if two context descriptors in the currently running program describe
/// the same context.
bool equalContexts(const ContextDescriptor *a, const ContextDescriptor *b);

/// Determines whether two type context descriptors describe the same type
/// context.
///
/// Runtime availability: Swift 5.4.
///
/// \param lhs The first type context descriptor to compare.
/// \param rhs The second type context descriptor to compare.
///
/// \returns true if both describe the same type context, false otherwise.
SWIFT_RUNTIME_EXPORT
SWIFT_CC(swift)
bool swift_compareTypeContextDescriptors(const TypeContextDescriptor *lhs,
                                         const TypeContextDescriptor *rhs);

/// Compute the bounds of class metadata with a resilient superclass.
SWIFT_RUNTIME_EXPORT
ClassMetadataBounds getResilientMetadataBounds(
                                           const ClassDescriptor *descriptor);
int32_t getResilientImmediateMembersOffset(const ClassDescriptor *descriptor);

/// Fetch a uniqued metadata object for a nominal type which requires
/// singleton metadata initialization.
SWIFT_RUNTIME_EXPORT SWIFT_CC(swift)
MetadataResponse
swift_getSingletonMetadata(MetadataRequest request,
                           const TypeContextDescriptor *description);

/// Fetch a uniqued metadata object for the generic nominal type described by
/// the provided candidate metadata, using that candidate metadata if there is
/// not already a canonical metadata.
///
/// Runtime availability: Swift 5.4
///
/// \param candidate A prespecialized metadata record for a type which is not
///                  statically made to be canonical which will be canonicalized
///                  if no other canonical metadata exists for the type.
/// \param cache A pointer to a cache which will be set to the canonical 
///              metadata record for the type described by the candidate 
///              metadata record.  If the cache has already been populated, its
///              contents will be returned.
/// \returns The canonical metadata for the specialized generic type described

Review comment (suggestion):
Could not figure out another way but this is likely fine to resolve

```
Undefined symbols for architecture arm64:
  "swift::getResilientMetadataBounds(swift::TargetClassDescriptor<swift::InProcess> const*)", referenced from:
      _swift_defaultActor_deallocateResilient in Actor.cpp.o
      _swift_distributedActor_remote_initialize in Actor.cpp.o
      (anonymous namespace)::DefaultActorImpl::deallocateUnconditional() in Actor.cpp.o
```

Code after:
/// type, AnyObject.
SWIFT_RUNTIME_EXPORT
const
  FullMetadata<ExistentialTypeMetadata> METADATA_SYM(ANYOBJECT_MANGLING);


/// True if two context descriptors in the currently running program describe
/// the same context.
bool equalContexts(const ContextDescriptor *a, const ContextDescriptor *b);

/// Determines whether two type context descriptors describe the same type
/// context.
///
/// Runtime availability: Swift 5.4.
///
/// \param lhs The first type context descriptor to compare.
/// \param rhs The second type context descriptor to compare.
///
/// \returns true if both describe the same type context, false otherwise.
SWIFT_RUNTIME_EXPORT
SWIFT_CC(swift)
bool swift_compareTypeContextDescriptors(const TypeContextDescriptor *lhs,
                                         const TypeContextDescriptor *rhs);

/// Compute the bounds of class metadata with a resilient superclass.
SWIFT_EXPORT_FROM_ATTRIBUTE(swiftCore) // Cannot use SWIFT_RUNTIME_EXPORT because it is not compatible with C linkage
ClassMetadataBounds getResilientMetadataBounds(
                                           const ClassDescriptor *descriptor);
int32_t getResilientImmediateMembersOffset(const ClassDescriptor *descriptor);

/// Fetch a uniqued metadata object for a nominal type which requires
/// singleton metadata initialization.
SWIFT_RUNTIME_EXPORT SWIFT_CC(swift)
MetadataResponse
swift_getSingletonMetadata(MetadataRequest request,
                           const TypeContextDescriptor *description);

/// Fetch a uniqued metadata object for the generic nominal type described by
/// the provided candidate metadata, using that candidate metadata if there is
/// not already a canonical metadata.
///
/// Runtime availability: Swift 5.4
///
/// \param candidate A prespecialized metadata record for a type which is not
///                  statically made to be canonical which will be canonicalized
///                  if no other canonical metadata exists for the type.
/// \param cache A pointer to a cache which will be set to the canonical 
///              metadata record for the type described by the candidate 
///              metadata record.  If the cache has already been populated, its
///              contents will be returned.
/// \returns The canonical metadata for the specialized generic type described