mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[ABI] Add the protocol conformance descriptor into a witness table.
Extend witness tables with a pointer to the protocol conformance descriptor from which the witness table was generated. This will allow us to determine (for example) whether two witness tables were generated from the same (or equivalent) conformances in the future, as well as discover more information about the witness table itself. Fixes rdar://problem/36287959.
This commit is contained in:
@@ -2682,6 +2682,12 @@ namespace {
|
||||
|
||||
// protocol _ObjectiveCBridgeable {
|
||||
struct _ObjectiveCBridgeableWitnessTable {
|
||||
/// The protocol conformance descriptor.
|
||||
const void *protocolConformanceDescriptor;
|
||||
|
||||
static_assert(WitnessTableFirstRequirementOffset == 1,
|
||||
"Witness table layout changed");
|
||||
|
||||
// associatedtype _ObjectiveCType : class
|
||||
const Metadata * (*ObjectiveCType)(
|
||||
const Metadata *parentMetadata,
|
||||
|
||||
Reference in New Issue
Block a user