Skip to content

Commit fdd7caf

Browse files
authored
[z/OS][SystemZ] Clang dependency files are text files (#121849)
The dependency file and the P1689 file are text files, but the open call misses the OF_Text flag. This PR adds the flag. Fixes regressions in test cases ClangScanDeps/modules-extern-unrelated.m and ClangScanDeps/P1689.cppm.
1 parent 0d7022e commit fdd7caf

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

clang/tools/clang-scan-deps/ClangScanDeps.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -913,7 +913,7 @@ int clang_scan_deps_main(int argc, char **argv, const llvm::ToolContext &) {
913913
return llvm::nulls();
914914

915915
std::error_code EC;
916-
FileOS.emplace(OutputFileName, EC);
916+
FileOS.emplace(OutputFileName, EC, llvm::sys::fs::OF_Text);
917917
if (EC) {
918918
llvm::errs() << "Failed to open output file '" << OutputFileName
919919
<< "': " << llvm::errorCodeToError(EC) << '\n';
@@ -1003,9 +1003,9 @@ int clang_scan_deps_main(int argc, char **argv, const llvm::ToolContext &) {
10031003
auto OSIter = OSs.find(MakeformatOutputPath);
10041004
if (OSIter == OSs.end()) {
10051005
std::error_code EC;
1006-
OSIter =
1007-
OSs.try_emplace(MakeformatOutputPath, MakeformatOutputPath, EC)
1008-
.first;
1006+
OSIter = OSs.try_emplace(MakeformatOutputPath, MakeformatOutputPath,
1007+
EC, llvm::sys::fs::OF_Text)
1008+
.first;
10091009
if (EC)
10101010
llvm::errs() << "Failed to open P1689 make format output file \""
10111011
<< MakeformatOutputPath << "\" for " << EC.message()

0 commit comments

Comments
 (0)