Skip to content

SwiftCompilerSources: remove references to C's stderr #74766

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
Jun 30, 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
25 changes: 0 additions & 25 deletions SwiftCompilerSources/Sources/Basic/Utils.swift
Original file line number Diff line number Diff line change
Expand Up @@ -67,31 +67,6 @@ public extension NoReflectionChildren {
var customMirror: Mirror { Mirror(self, children: []) }
}

#if !os(Windows)
// TODO: https://github.com/apple/swift/issues/73252

public var standardError = CFileStream(fp: stderr)

#if os(Android) || canImport(Musl)
public typealias FILEPointer = OpaquePointer
#else
public typealias FILEPointer = UnsafeMutablePointer<FILE>
#endif

public struct CFileStream: TextOutputStream {
var fp: FILEPointer

public func write(_ string: String) {
fputs(string, fp)
}

public func flush() {
fflush(fp)
}
}

#endif

//===----------------------------------------------------------------------===//
// StringRef
//===----------------------------------------------------------------------===//
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,10 +126,7 @@ private struct DiagnoseDependence {
}

func reportUnknown(operand: Operand) {
#if !os(Windows)
// TODO: https://github.com/apple/swift/issues/73252
standardError.write("Unknown use: \(operand)\n\(function)")
#endif
log("Unknown use: \(operand)\n\(function)")
reportEscaping(operand: operand)
}

Expand Down