Skip to content

Commit bd0b903

Browse files
authored
Mark the file opened by DeserializedDeclsSourceRangePrinter as a text file (#135842)
This PR will fix the following lit failure seeing on z/OS and most likely on Windows: `FAIL: Clang :: Frontend/dump-minimization-hints.cpp` Without `OF_TextWithCRLF` flag, a file is treated as binary and is read improperly, at least on z/OS.
1 parent 927a0cb commit bd0b903

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clang/lib/Frontend/FrontendAction.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ FrontendAction::CreateWrappedASTConsumer(CompilerInstance &CI,
312312
std::error_code ErrorCode;
313313
auto FileStream = std::make_unique<llvm::raw_fd_ostream>(
314314
DumpDeserializedDeclarationRangesPath, ErrorCode,
315-
llvm::sys::fs::OF_None);
315+
llvm::sys::fs::OF_TextWithCRLF);
316316
if (!ErrorCode) {
317317
Consumers.push_back(std::make_unique<DeserializedDeclsSourceRangePrinter>(
318318
CI.getSourceManager(), std::move(FileStream)));

0 commit comments

Comments
 (0)