We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents f79b73a + 58c01be commit a172489Copy full SHA for a172489
include/swift/RemoteInspection/ReflectionContext.h
@@ -1038,10 +1038,12 @@ class ReflectionContext
1038
// Generic SIL @box type - there is always an instantiated metadata
1039
// pointer for the boxed type.
1040
if (auto Meta = readMetadata(*MetadataAddress)) {
1041
- auto GenericHeapMeta =
1042
- cast<TargetGenericBoxHeapMetadata<Runtime>>(Meta.getLocalBuffer());
1043
- return getMetadataTypeInfo(GenericHeapMeta->BoxedType,
1044
- ExternalTypeInfo);
+ if (auto *GenericHeapMeta = cast<TargetGenericBoxHeapMetadata<Runtime>>(
+ Meta.getLocalBuffer())) {
+ auto MetadataAddress = GenericHeapMeta->BoxedType;
+ auto TR = readTypeFromMetadata(MetadataAddress);
1045
+ return getTypeInfo(TR, ExternalTypeInfo);
1046
+ }
1047
}
1048
return nullptr;
1049
0 commit comments