Skip to content

Commit b2fe6b5

Browse files
eecksteinjrose-apple
authored andcommitted
runtime: remove an unnecessary helper function to get the class name
(cherry picked from commit ce18868)
1 parent 8f6294a commit b2fe6b5

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

stdlib/public/SDK/Foundation/CheckClass.mm

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,6 @@
44

55
#include "swift/Runtime/Metadata.h"
66

7-
// Aliases for Objective-C runtime entry points.
8-
static const char *class_getName(const swift::ClassMetadata* type) {
9-
return class_getName(
10-
reinterpret_cast<Class>(const_cast<swift::ClassMetadata*>(type)));
11-
}
12-
137
@interface NSKeyedUnarchiver (SwiftAdditions)
148
+ (int)_swift_checkClassAndWarnForKeyedArchiving:(Class)cls
159
operation:(int)operation
@@ -44,7 +38,7 @@ + (int)_swift_checkClassAndWarnForKeyedArchiving:(Class)cls
4438
return 0;
4539

4640
// Is it a mangled name?
47-
const char *className = class_getName(theClass);
41+
const char *className = class_getName(cls);
4842
if (!(className[0] == '_' && className[1] == 'T'))
4943
return 0;
5044
// Is it a name in the form <module>.<class>? Note: the module name could

0 commit comments

Comments
 (0)