================ @@ -864,8 +873,24 @@ int clang_scan_deps_main(int argc, char **argv, const llvm::ToolContext &) { }); SharedStream Errs(llvm::errs()); - // Print out the dependency results to STDOUT by default. - SharedStream DependencyOS(llvm::outs()); + + std::optional<llvm::raw_fd_ostream> FileOS; + llvm::raw_ostream &ThreadUnsafeDependencyOS = [&]() -> llvm::raw_ostream & { + if (OutputFileName == "-") + return llvm::outs(); ---------------- benlangmuir wrote:
I don't feel strongly about whether you should change this code or not -- maybe it's clearer the way it is? -- but `raw_fd_ostream("-", EC)` is going to be the same as `outs()` anyway. https://github.com/llvm/llvm-project/pull/88767 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits