Skip to content

Conversation

egorzhdan
Copy link
Contributor

This allows checking strings for equality, e.g. llvmString == "some swift string literal" without an explicit string conversion.

Inspired by a similar operator in SwiftCompilerSources, with a minor difference that this works for raw LLVM StringRefs, not for wrapped LLVM StringRefs: https://github.com/apple/swift/blob/aea26bbc6e59520c067f2f5dc85b1d9f1cd28d2e/SwiftCompilerSources/Sources/Basic/Utils.swift#L69

This allows checking strings for equality, e.g. `llvmString == "some swift string literal"` without an explicit string conversion.
@egorzhdan egorzhdan merged commit a132e1c into llvm.org/main Oct 17, 2022
@egorzhdan egorzhdan deleted the string-equals branch October 17, 2022 12:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant