File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -67,27 +67,25 @@ extern "C" const void *swift_dynamicCastObjCProtocolConditional(
67
67
static void _buildNameForMetadata (const Metadata *type,
68
68
bool qualified,
69
69
std::string &result) {
70
+ #if SWIFT_OBJC_INTEROP
70
71
if (type->getKind () == MetadataKind::Class) {
71
72
auto classType = static_cast <const ClassMetadata *>(type);
72
- #if SWIFT_OBJC_INTEROP
73
73
// Look through artificial subclasses.
74
74
while (classType->isTypeMetadata () && classType->isArtificialSubclass ())
75
75
classType = classType->SuperClass ;
76
-
76
+
77
77
// Ask the Objective-C runtime to name ObjC classes.
78
78
if (!classType->isTypeMetadata ()) {
79
79
result += class_getName (classType);
80
80
return ;
81
81
}
82
- #endif
83
82
} else if (type->getKind () == MetadataKind::ObjCClassWrapper) {
84
- #if SWIFT_OBJC_INTEROP
85
83
auto objcWrapper = static_cast <const ObjCClassWrapperMetadata *>(type);
86
84
const char *className = class_getName ((Class)objcWrapper->Class );
87
85
result = className;
88
86
return ;
89
- #endif
90
87
}
88
+ #endif
91
89
92
90
// Use the remangler to generate a mangled name from the type metadata.
93
91
auto demangling = _swift_buildDemanglingForMetadata (type);
You can’t perform that action at this time.
0 commit comments