Skip to content

Commit af733e7

Browse files
committed
[RemoteInspection] Specify precise return type of RecordTypeInfo (NFC)
1 parent 21fa110 commit af733e7

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

include/swift/RemoteInspection/ReflectionContext.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,8 @@ class ReflectionContext
121121
using super::readMetadata;
122122
using super::readObjCClassName;
123123
using super::readResolvedPointerValue;
124-
std::unordered_map<typename super::StoredPointer, const TypeInfo *> Cache;
124+
std::unordered_map<typename super::StoredPointer, const RecordTypeInfo *>
125+
Cache;
125126

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

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

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

886-
const TypeInfo *TI = nullptr;
887+
const RecordTypeInfo *TI = nullptr;
887888

888889
auto TR = readTypeFromMetadata(MetadataAddress);
889890
auto kind = this->readKindFromMetadata(MetadataAddress);

include/swift/RemoteInspection/TypeLowering.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,7 @@ class TypeConverter {
377377
/// class.
378378
///
379379
/// Not cached.
380-
const TypeInfo *
380+
const RecordTypeInfo *
381381
getClassInstanceTypeInfo(const TypeRef *TR, unsigned start,
382382
remote::TypeInfoProvider *ExternalTypeInfo);
383383

stdlib/public/RemoteInspection/TypeLowering.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2602,7 +2602,7 @@ TypeConverter::getTypeInfo(const TypeRef *TR,
26022602
return TI;
26032603
}
26042604

2605-
const TypeInfo *TypeConverter::getClassInstanceTypeInfo(
2605+
const RecordTypeInfo *TypeConverter::getClassInstanceTypeInfo(
26062606
const TypeRef *TR, unsigned start,
26072607
remote::TypeInfoProvider *ExternalTypeInfo) {
26082608
auto FD = getBuilder().getFieldTypeInfo(TR);

0 commit comments

Comments
 (0)