Skip to content

Commit a91a884

Browse files
Merge pull request #73713 from augusto2112/tip-computeUnaligned-6
[RemoteInspection] Add TypeInfoProvider to ReflectionContext function
2 parents 7a48ca7 + 63111cc commit a91a884

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

include/swift/RemoteInspection/ReflectionContext.h

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1276,7 +1276,9 @@ class ReflectionContext
12761276
/// the superclass's fields. For a version of this function that performs the
12771277
/// same job but starting out with an instance pointer check
12781278
/// MetadataReader::readInstanceStartFromClassMetadata.
1279-
std::optional<unsigned> computeUnalignedFieldStartOffset(const TypeRef *TR) {
1279+
std::optional<unsigned>
1280+
computeUnalignedFieldStartOffset(const TypeRef *TR,
1281+
remote::TypeInfoProvider *ExternalTypeInfo) {
12801282
size_t isaAndRetainCountSize = sizeof(StoredSize) + sizeof(long long);
12811283

12821284
const TypeRef *superclass = getBuilder().lookupSuperclass(TR);
@@ -1286,12 +1288,12 @@ class ReflectionContext
12861288
return isaAndRetainCountSize;
12871289

12881290
auto superclassStart =
1289-
computeUnalignedFieldStartOffset(superclass);
1291+
computeUnalignedFieldStartOffset(superclass, ExternalTypeInfo);
12901292
if (!superclassStart)
12911293
return std::nullopt;
12921294

12931295
auto *superTI = getBuilder().getTypeConverter().getClassInstanceTypeInfo(
1294-
superclass, *superclassStart, nullptr);
1296+
superclass, *superclassStart, ExternalTypeInfo);
12951297
if (!superTI)
12961298
return std::nullopt;
12971299

0 commit comments

Comments
 (0)