File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -113,15 +113,14 @@ Metadata *TargetSingletonMetadataInitialization<InProcess>::allocate(
113
113
// Such a template will fail the `isTypeMetadata` test and we'll think that it
114
114
// isn't Swift metadata but a plain old ObjC class instead.
115
115
if (metadata->getKind () == MetadataKind::Class) {
116
- auto *classMetadata = static_cast <ClassMetadata*>(metadata);
117
- #if SWIFT_OBJC_INTEROP
118
- classMetadata->setAsTypeMetadata ();
119
- #endif
120
116
auto *fullMetadata = asFullMetadata (metadata);
121
117
122
118
// Begin by initializing the value witness table; everything else is
123
119
// initialized by swift_initClassMetadata().
124
120
#if SWIFT_OBJC_INTEROP
121
+ auto *classMetadata = static_cast <ClassMetadata*>(metadata);
122
+ classMetadata->setAsTypeMetadata ();
123
+
125
124
fullMetadata->ValueWitnesses =
126
125
(classMetadata->Flags & ClassFlags::UsesSwiftRefcounting)
127
126
? &VALUE_WITNESS_SYM (Bo)
You can’t perform that action at this time.
0 commit comments