From bd0b903a91721570e0bc98f7ed8b0aaf2f2a628b Mon Sep 17 00:00:00 2001 From: Zibi Sarbinowski Date: Thu, 17 Apr 2025 10:08:57 -0400 Subject: 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. --- clang/lib/Frontend/FrontendAction.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'clang/lib/Frontend/FrontendAction.cpp') diff --git a/clang/lib/Frontend/FrontendAction.cpp b/clang/lib/Frontend/FrontendAction.cpp index bd084aa..1c4dec0 100644 --- a/clang/lib/Frontend/FrontendAction.cpp +++ b/clang/lib/Frontend/FrontendAction.cpp @@ -312,7 +312,7 @@ FrontendAction::CreateWrappedASTConsumer(CompilerInstance &CI, std::error_code ErrorCode; auto FileStream = std::make_unique( DumpDeserializedDeclarationRangesPath, ErrorCode, - llvm::sys::fs::OF_None); + llvm::sys::fs::OF_TextWithCRLF); if (!ErrorCode) { Consumers.push_back(std::make_unique( CI.getSourceManager(), std::move(FileStream))); -- cgit v1.1