File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -1166,7 +1166,7 @@ void swift::_swift_getFieldAt(
1166
1166
if (typeInfo == nullptr ) {
1167
1167
typeInfo = TypeInfo (&METADATA_SYM (EMPTY_TUPLE_MANGLING), {});
1168
1168
warning (0 , " SWIFT RUNTIME BUG: unable to demangle type of field '%*s'. "
1169
- " mangled type name is '%*s'" ,
1169
+ " mangled type name is '%*s'\n " ,
1170
1170
(int )name.size (), name.data (),
1171
1171
(int )typeName.size (), typeName.data ());
1172
1172
}
@@ -1214,6 +1214,17 @@ void swift::_swift_getFieldAt(
1214
1214
return ;
1215
1215
}
1216
1216
}
1217
+
1218
+ // If we failed to find the field descriptor metadata for the type, fall
1219
+ // back to returning an empty tuple as a standin.
1220
+ auto typeName = swift_getTypeName (base, /* qualified*/ true );
1221
+ warning (0 , " SWIFT RUNTIME BUG: unable to find field metadata for type '%*s'\n " ,
1222
+ (int )typeName.length , typeName.data );
1223
+ callback (" unknown" ,
1224
+ FieldType ()
1225
+ .withType (TypeInfo (&METADATA_SYM (EMPTY_TUPLE_MANGLING), {}))
1226
+ .withIndirect (false )
1227
+ .withWeak (false ));
1217
1228
}
1218
1229
1219
1230
#define OVERRIDE_METADATALOOKUP COMPATIBILITY_OVERRIDE
You can’t perform that action at this time.
0 commit comments