File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
include/swift/RemoteInspection Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -1038,10 +1038,12 @@ class ReflectionContext
1038
1038
// Generic SIL @box type - there is always an instantiated metadata
1039
1039
// pointer for the boxed type.
1040
1040
if (auto Meta = readMetadata (*MetadataAddress)) {
1041
- auto GenericHeapMeta =
1042
- cast<TargetGenericBoxHeapMetadata<Runtime>>(Meta.getLocalBuffer ());
1043
- return getMetadataTypeInfo (GenericHeapMeta->BoxedType ,
1044
- ExternalTypeInfo);
1041
+ if (auto *GenericHeapMeta = cast<TargetGenericBoxHeapMetadata<Runtime>>(
1042
+ Meta.getLocalBuffer ())) {
1043
+ auto MetadataAddress = GenericHeapMeta->BoxedType ;
1044
+ auto TR = readTypeFromMetadata (MetadataAddress);
1045
+ return getTypeInfo (TR, ExternalTypeInfo);
1046
+ }
1045
1047
}
1046
1048
return nullptr ;
1047
1049
}
You can’t perform that action at this time.
0 commit comments