@@ -1700,52 +1700,62 @@ class DecodedMetadataBuilder {
1700
1700
// Mangled types for building metadata don't contain sugared types
1701
1701
return BuiltType ();
1702
1702
}
1703
-
1703
+
1704
1704
const WitnessTable *
1705
1705
createConcreteProtocolConformance (const Metadata *conformingType,
1706
1706
const ProtocolConformanceDescriptor *conformanceDecl,
1707
1707
llvm::ArrayRef<const WitnessTable *> args) {
1708
1708
if (args.size () != conformanceDecl->getConditionalRequirements ().size ())
1709
1709
return nullptr ;
1710
-
1710
+
1711
1711
auto argsPtr = (const void * const *)args.data ();
1712
1712
return swift_getWitnessTable (conformanceDecl, conformingType, argsPtr);
1713
1713
}
1714
-
1714
+
1715
1715
const WitnessTable *
1716
1716
createDependentProtocolConformanceRoot (const Metadata *conformingType,
1717
1717
ProtocolDescriptorRef requirement,
1718
1718
unsigned index) {
1719
1719
return substWitnessTable (conformingType, index);
1720
1720
}
1721
-
1721
+
1722
1722
const WitnessTable *
1723
1723
createDependentProtocolConformanceAssociated (const WitnessTable *base,
1724
1724
const Metadata *conformingType,
1725
1725
ProtocolDescriptorRef requirement,
1726
1726
unsigned index) {
1727
-
1727
+ return substWitnessTable (conformingType, index);
1728
1728
}
1729
-
1729
+
1730
1730
const WitnessTable *
1731
1731
createDependentProtocolConformanceInherited (const WitnessTable *base,
1732
1732
ProtocolDescriptorRef requirement,
1733
- unsigned index);
1734
-
1733
+ unsigned index) {
1734
+ return substWitnessTable (base->getDescription ()->getCanonicalTypeMetadata (),
1735
+ index);
1736
+ }
1737
+
1735
1738
const ProtocolConformanceDescriptor *
1736
1739
createProtocolConformanceDeclInTypeModule (const Metadata *conformingType,
1737
1740
ProtocolDescriptorRef protocol) {
1738
-
1741
+ return swift_getConformanceDescriptor (conformingType,
1742
+ protocol.getSwiftProtocol ());
1739
1743
}
1740
-
1744
+
1741
1745
const ProtocolConformanceDescriptor *
1742
1746
createProtocolConformanceDeclInProtocolModule (const Metadata *conformingType,
1743
- ProtocolDescriptorRef protocol);
1747
+ ProtocolDescriptorRef protocol) {
1748
+ return swift_getConformanceDescriptor (conformingType,
1749
+ protocol.getSwiftProtocol ());
1750
+ }
1744
1751
1745
1752
const ProtocolConformanceDescriptor *
1746
1753
createProtocolConformanceDeclRetroactive (const Metadata *conformingType,
1747
1754
ProtocolDescriptorRef protocol,
1748
- StringRef moduleName);
1755
+ StringRef moduleName) {
1756
+ return swift_getConformanceDescriptor (conformingType,
1757
+ protocol.getSwiftProtocol ());
1758
+ }
1749
1759
};
1750
1760
1751
1761
}
0 commit comments