Skip to content

[SwiftCompilerSources] Use interpolation instead of String(describing:) #78288

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion SwiftCompilerSources/Sources/AST/Registration.swift
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public func registerAST() {
}

private func registerDecl<T: AnyObject>(_ cl: T.Type) {
String(describing: cl)._withBridgedStringRef { nameStr in
"\(cl)"._withBridgedStringRef { nameStr in
let metatype = unsafeBitCast(cl, to: SwiftMetatype.self)
registerBridgedDecl(nameStr, metatype)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ private func run<InstType: SILCombineSimplifyable>(_ instType: InstType.Type,
private func registerForSILCombine<InstType: SILCombineSimplifyable>(
_ instType: InstType.Type,
_ runFn: @escaping (@convention(c) (BridgedInstructionPassCtxt) -> ())) {
String(describing: instType)._withBridgedStringRef { instClassStr in
"\(instType)"._withBridgedStringRef { instClassStr in
SILCombine_registerInstructionPass(instClassStr, runFn)
}
}
Expand Down
2 changes: 1 addition & 1 deletion SwiftCompilerSources/Sources/SIL/Registration.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import Basic
import SILBridging

private func register<T: AnyObject>(_ cl: T.Type) {
String(describing: cl)._withBridgedStringRef { nameStr in
"\(cl)"._withBridgedStringRef { nameStr in
let metatype = unsafeBitCast(cl, to: SwiftMetatype.self)
registerBridgedClass(nameStr, metatype)
}
Expand Down