File tree Expand file tree Collapse file tree 1 file changed +20
-2
lines changed Expand file tree Collapse file tree 1 file changed +20
-2
lines changed Original file line number Diff line number Diff line change @@ -1883,7 +1883,16 @@ namespace {
1883
1883
1884
1884
MetadataResponse visitProtocolType (CanProtocolType type,
1885
1885
DynamicMetadataRequest request) {
1886
- llvm_unreachable (" constraint type should be wrapped in existential type" );
1886
+ assert (false && " constraint type should be wrapped in existential type" );
1887
+
1888
+ CanExistentialType existential (
1889
+ ExistentialType::get (type)->castTo <ExistentialType>());
1890
+
1891
+ if (auto metatype = tryGetLocal (existential, request))
1892
+ return metatype;
1893
+
1894
+ auto metadata = emitExistentialTypeMetadata (existential);
1895
+ return setLocal (type, MetadataResponse::forComplete (metadata));
1887
1896
}
1888
1897
1889
1898
MetadataResponse
@@ -1892,7 +1901,16 @@ namespace {
1892
1901
if (type->isAny () || type->isAnyObject ())
1893
1902
return emitSingletonExistentialTypeMetadata (type);
1894
1903
1895
- llvm_unreachable (" constraint type should be wrapped in existential type" );
1904
+ assert (false && " constraint type should be wrapped in existential type" );
1905
+
1906
+ CanExistentialType existential (
1907
+ ExistentialType::get (type)->castTo <ExistentialType>());
1908
+
1909
+ if (auto metatype = tryGetLocal (existential, request))
1910
+ return metatype;
1911
+
1912
+ auto metadata = emitExistentialTypeMetadata (existential);
1913
+ return setLocal (type, MetadataResponse::forComplete (metadata));
1896
1914
}
1897
1915
1898
1916
MetadataResponse
You can’t perform that action at this time.
0 commit comments