[clang] Mark the file opened by DeserializedDeclsSourceRangePrinter as a text file (PR #135842)
Zibi Sarbinowski via cfe-commits
cfe-commits at lists.llvm.org
Wed Apr 16 17:00:59 PDT 2025
https://github.com/zibi2 updated https://github.com/llvm/llvm-project/pull/135842
>From b162b0476058c40b2fcbf7ef397696caead11a7f Mon Sep 17 00:00:00 2001
From: Zibi Sarbinowski <zibi at ca.ibm.com>
Date: Tue, 15 Apr 2025 19:10:02 +0000
Subject: [PATCH 1/3] Mark the file opened by
DeserializedDeclsSourceRangePrinter as a text file
---
clang/lib/Frontend/FrontendAction.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/clang/lib/Frontend/FrontendAction.cpp b/clang/lib/Frontend/FrontendAction.cpp
index bd084aa94fc37..1c4dec08575d1 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<llvm::raw_fd_ostream>(
DumpDeserializedDeclarationRangesPath, ErrorCode,
- llvm::sys::fs::OF_None);
+ llvm::sys::fs::OF_TextWithCRLF);
if (!ErrorCode) {
Consumers.push_back(std::make_unique<DeserializedDeclsSourceRangePrinter>(
CI.getSourceManager(), std::move(FileStream)));
>From d4cfd87c1c363488c6eb2410e5b01d88ac283a4e Mon Sep 17 00:00:00 2001
From: Zibi Sarbinowski <zibi at ca.ibm.com>
Date: Wed, 16 Apr 2025 21:21:42 +0000
Subject: [PATCH 2/3] rerun checks
>From 81a1df41f46df706b6acc2dfe87d75e584cdb064 Mon Sep 17 00:00:00 2001
From: Zibi Sarbinowski <zibi at ca.ibm.com>
Date: Thu, 17 Apr 2025 00:01:25 +0000
Subject: [PATCH 3/3] Testing with OF_Text
---
clang/lib/Frontend/FrontendAction.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/clang/lib/Frontend/FrontendAction.cpp b/clang/lib/Frontend/FrontendAction.cpp
index 1c4dec08575d1..58d20cbb5ebd8 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<llvm::raw_fd_ostream>(
DumpDeserializedDeclarationRangesPath, ErrorCode,
- llvm::sys::fs::OF_TextWithCRLF);
+ llvm::sys::fs::OF_Text);
if (!ErrorCode) {
Consumers.push_back(std::make_unique<DeserializedDeclsSourceRangePrinter>(
CI.getSourceManager(), std::move(FileStream)));
More information about the cfe-commits
mailing list