Skip to content

Commit ef557a1

Browse files
committed
runtime: rename 'getReflectableConformance()' to 'unwrapExistential()'
1 parent a4fb03f commit ef557a1

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

stdlib/public/runtime/Reflection.mm

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ void swift_MagicMirrorData_summary(const Metadata *T, String *result) {
305305
}
306306

307307
static std::tuple<const Metadata *, const OpaqueValue *>
308-
getReflectableConformance(const Metadata *T, const OpaqueValue *Value) {
308+
unwrapExistential(const Metadata *T, const OpaqueValue *Value) {
309309
// If the value is an existential container, look through it to reflect the
310310
// contained value.
311311
// TODO: Should look through existential metatypes too, but it doesn't
@@ -336,7 +336,7 @@ static Mirror reflect(HeapObject *owner,
336336
const Metadata *T) {
337337
const Metadata *mirrorType;
338338
const OpaqueValue *mirrorValue;
339-
std::tie(mirrorType, mirrorValue) = getReflectableConformance(T, value);
339+
std::tie(mirrorType, mirrorValue) = unwrapExistential(T, value);
340340

341341
// Use MagicMirror.
342342
// Consumes 'owner'.
@@ -510,7 +510,7 @@ static void getEnumMirrorInfo(const OpaqueValue *value,
510510
// Build a magic mirror. Unconditionally destroy the value at the end.
511511
const Metadata *mirrorType;
512512
const OpaqueValue *cMirrorValue;
513-
std::tie(mirrorType, cMirrorValue) = getReflectableConformance(type, value);
513+
std::tie(mirrorType, cMirrorValue) = unwrapExistential(type, value);
514514

515515
OpaqueValue *mirrorValue = const_cast<OpaqueValue*>(cMirrorValue);
516516
Mirror mirror;
@@ -1097,7 +1097,7 @@ static Mirror ObjC_getMirrorForSuperclass(Class sup,
10971097
MirrorReturn swift::swift_reflectAny(OpaqueValue *value, const Metadata *T) {
10981098
const Metadata *mirrorType;
10991099
const OpaqueValue *cMirrorValue;
1100-
std::tie(mirrorType, cMirrorValue) = getReflectableConformance(T, value);
1100+
std::tie(mirrorType, cMirrorValue) = unwrapExistential(T, value);
11011101

11021102
OpaqueValue *mirrorValue = const_cast<OpaqueValue*>(cMirrorValue);
11031103

0 commit comments

Comments
 (0)