Skip to content

[RemoteInspection] Specify precise return type of RecordTypeInfo (NFC) #65191

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions include/swift/RemoteInspection/ReflectionContext.h
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,8 @@ class ReflectionContext
using super::readMetadata;
using super::readObjCClassName;
using super::readResolvedPointerValue;
std::unordered_map<typename super::StoredPointer, const TypeInfo *> Cache;
std::unordered_map<typename super::StoredPointer, const RecordTypeInfo *>
Cache;

/// All buffers we need to keep around long term. This will automatically free them
/// when this object is destroyed.
Expand Down Expand Up @@ -873,7 +874,7 @@ class ReflectionContext

/// Return a description of the layout of a class instance with the given
/// metadata as its isa pointer.
const TypeInfo *
const RecordTypeInfo *
getMetadataTypeInfo(StoredPointer MetadataAddress,
remote::TypeInfoProvider *ExternalTypeInfo) {
// See if we cached the layout already
Expand All @@ -883,7 +884,7 @@ class ReflectionContext

auto &TC = getBuilder().getTypeConverter();

const TypeInfo *TI = nullptr;
const RecordTypeInfo *TI = nullptr;

auto TR = readTypeFromMetadata(MetadataAddress);
auto kind = this->readKindFromMetadata(MetadataAddress);
Expand Down
2 changes: 1 addition & 1 deletion include/swift/RemoteInspection/TypeLowering.h
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ class TypeConverter {
/// class.
///
/// Not cached.
const TypeInfo *
const RecordTypeInfo *
getClassInstanceTypeInfo(const TypeRef *TR, unsigned start,
remote::TypeInfoProvider *ExternalTypeInfo);

Expand Down
2 changes: 1 addition & 1 deletion stdlib/public/RemoteInspection/TypeLowering.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2602,7 +2602,7 @@ TypeConverter::getTypeInfo(const TypeRef *TR,
return TI;
}

const TypeInfo *TypeConverter::getClassInstanceTypeInfo(
const RecordTypeInfo *TypeConverter::getClassInstanceTypeInfo(
const TypeRef *TR, unsigned start,
remote::TypeInfoProvider *ExternalTypeInfo) {
auto FD = getBuilder().getFieldTypeInfo(TR);
Expand Down