swift
35263ef9 - [cxx-interop][SwiftCompilerSources] Do not use `SWIFT_IMPORT_UNSAFE` with `BridgedOwnedString`

Commit
1 year ago
[cxx-interop][SwiftCompilerSources] Do not use `SWIFT_IMPORT_UNSAFE` with `BridgedOwnedString` `SWIFT_IMPORT_UNSAFE` is an escape hatch that can be used to make the Swift compiler ignore its usual safety heuristics for C++ types. `BridgedOwnedString` fits into the definition of a self-contained C++ type in Swift: it manages the lifetimes of its own fields. This removes the usages of `SWIFT_IMPORT_UNSAFE` for C++ functions that return `BridgedOwnedString`, and annotates `BridgedOwnedString` as a self-contained type.
Author
Parents
Loading