FilePath: enable building on Windows (#41)

When building on Windows, we rely on the `withPlatformString` to convert
the strings to the native platform encoding (UTF-16).  The public
`FilePath.withPlatformString` is marked as `@_alwaysEmitIntoClient` and
references the `_withPlatformString` which is marked as `internal`.
Annotate the function as `@usableFromInline` to enable the inlined
method to reference this function.
This commit is contained in:
Saleem Abdulrasool authored and GitHub committed 2021-03-20 17:29:54 -06:00
1 parent 65a906baf1
commit 603718e247
1 file changed
+1
@@ -190,6 +190,7 @@ extension FilePath.Root: _PathSlice {
}
}
extension FilePath: _PlatformStringable {
@usableFromInline
func _withPlatformString<Result>(_ body: (UnsafePointer<CInterop.PlatformChar>) throws -> Result) rethrows -> Result {
try _storage.withPlatformString(body)
}