diff --git a/SwiftCompilerSources/Sources/AST/Registration.swift b/SwiftCompilerSources/Sources/AST/Registration.swift index 919ef13223cb6..20e1840fa27b4 100644 --- a/SwiftCompilerSources/Sources/AST/Registration.swift +++ b/SwiftCompilerSources/Sources/AST/Registration.swift @@ -49,7 +49,7 @@ public func registerAST() { } private func registerDecl(_ cl: T.Type) { - String(describing: cl)._withBridgedStringRef { nameStr in + "\(cl)"._withBridgedStringRef { nameStr in let metatype = unsafeBitCast(cl, to: SwiftMetatype.self) registerBridgedDecl(nameStr, metatype) } diff --git a/SwiftCompilerSources/Sources/Optimizer/PassManager/PassRegistration.swift b/SwiftCompilerSources/Sources/Optimizer/PassManager/PassRegistration.swift index 90628a29d0956..6e252c5d442ac 100644 --- a/SwiftCompilerSources/Sources/Optimizer/PassManager/PassRegistration.swift +++ b/SwiftCompilerSources/Sources/Optimizer/PassManager/PassRegistration.swift @@ -56,7 +56,7 @@ private func run(_ instType: InstType.Type, private func registerForSILCombine( _ instType: InstType.Type, _ runFn: @escaping (@convention(c) (BridgedInstructionPassCtxt) -> ())) { - String(describing: instType)._withBridgedStringRef { instClassStr in + "\(instType)"._withBridgedStringRef { instClassStr in SILCombine_registerInstructionPass(instClassStr, runFn) } } diff --git a/SwiftCompilerSources/Sources/SIL/Registration.swift b/SwiftCompilerSources/Sources/SIL/Registration.swift index ddba09010419f..89331abbf3aed 100644 --- a/SwiftCompilerSources/Sources/SIL/Registration.swift +++ b/SwiftCompilerSources/Sources/SIL/Registration.swift @@ -14,7 +14,7 @@ import Basic import SILBridging private func register(_ cl: T.Type) { - String(describing: cl)._withBridgedStringRef { nameStr in + "\(cl)"._withBridgedStringRef { nameStr in let metatype = unsafeBitCast(cl, to: SwiftMetatype.self) registerBridgedClass(nameStr, metatype) }