mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[IRGen] Metadata for the conforming type in a witness table access need not be complete.
When calling a witness table accessor, IRGen was forcing the conforming type to have complete metadata, even though only abstract metadata is required for that query. This could cause cyclic metadata dependencies when checking conditional conformances. Fixes SR-5958.
This commit is contained in:
@@ -1114,7 +1114,7 @@ static llvm::Value *emitWitnessTableAccessorCall(
|
||||
|
||||
// Emit the source metadata if we haven't yet.
|
||||
if (!*srcMetadataCache) {
|
||||
*srcMetadataCache = IGF.emitTypeMetadataRef(
|
||||
*srcMetadataCache = IGF.emitAbstractTypeMetadataRef(
|
||||
conformance->getType()->getCanonicalType());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user