[llvm] [SystemZ][z/OS] Continue marking text files with OF_Text (PR #95111)
Abhina Sree via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 11 06:46:32 PDT 2024
https://github.com/abhina-sree created https://github.com/llvm/llvm-project/pull/95111
Text files should be opened with OF_Text to have the correct encoding.
>From bcb4f577f88202dd0f3c5116b05e186bdd41c3bd Mon Sep 17 00:00:00 2001
From: Abhina Sreeskantharajan <Abhina.Sreeskantharajan at ibm.com>
Date: Tue, 11 Jun 2024 09:45:19 -0400
Subject: [PATCH] Continue marking text files with OF_Text
---
llvm/lib/Analysis/ModuleSummaryAnalysis.cpp | 2 +-
llvm/lib/LTO/LTOBackend.cpp | 2 +-
llvm/lib/Passes/StandardInstrumentations.cpp | 2 +-
llvm/lib/Transforms/IPO/FunctionImport.cpp | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/llvm/lib/Analysis/ModuleSummaryAnalysis.cpp b/llvm/lib/Analysis/ModuleSummaryAnalysis.cpp
index c863936a51882..a9913773fd13e 100644
--- a/llvm/lib/Analysis/ModuleSummaryAnalysis.cpp
+++ b/llvm/lib/Analysis/ModuleSummaryAnalysis.cpp
@@ -1075,7 +1075,7 @@ ModuleSummaryIndex llvm::buildModuleSummaryIndex(
if (!ModuleSummaryDotFile.empty()) {
std::error_code EC;
- raw_fd_ostream OSDot(ModuleSummaryDotFile, EC, sys::fs::OpenFlags::OF_None);
+ raw_fd_ostream OSDot(ModuleSummaryDotFile, EC, sys::fs::OpenFlags::OF_Text);
if (EC)
report_fatal_error(Twine("Failed to open dot file ") +
ModuleSummaryDotFile + ": " + EC.message() + "\n");
diff --git a/llvm/lib/LTO/LTOBackend.cpp b/llvm/lib/LTO/LTOBackend.cpp
index 76223e88ca1ac..84a69d9ff1a1f 100644
--- a/llvm/lib/LTO/LTOBackend.cpp
+++ b/llvm/lib/LTO/LTOBackend.cpp
@@ -143,7 +143,7 @@ Error Config::addSaveTemps(std::string OutputFileName, bool UseInputModulePath,
writeIndexToFile(Index, OS);
Path = OutputFileName + "index.dot";
- raw_fd_ostream OSDot(Path, EC, sys::fs::OpenFlags::OF_None);
+ raw_fd_ostream OSDot(Path, EC, sys::fs::OpenFlags::OF_Text);
if (EC)
reportOpenError(Path, EC.message());
Index.exportToDot(OSDot, GUIDPreservedSymbols);
diff --git a/llvm/lib/Passes/StandardInstrumentations.cpp b/llvm/lib/Passes/StandardInstrumentations.cpp
index c7adc7668b9a1..429edabcc6558 100644
--- a/llvm/lib/Passes/StandardInstrumentations.cpp
+++ b/llvm/lib/Passes/StandardInstrumentations.cpp
@@ -838,7 +838,7 @@ static int prepareDumpIRFileDescriptor(const StringRef DumpIRFilename) {
}
int Result = 0;
EC = sys::fs::openFile(DumpIRFilename, Result, sys::fs::CD_OpenAlways,
- sys::fs::FA_Write, sys::fs::OF_None);
+ sys::fs::FA_Write, sys::fs::OF_Text);
if (EC)
report_fatal_error(Twine("Failed to open ") + DumpIRFilename +
" to support -ir-dump-directory: " + EC.message());
diff --git a/llvm/lib/Transforms/IPO/FunctionImport.cpp b/llvm/lib/Transforms/IPO/FunctionImport.cpp
index cb19bf2a4ae17..b4514b938c277 100644
--- a/llvm/lib/Transforms/IPO/FunctionImport.cpp
+++ b/llvm/lib/Transforms/IPO/FunctionImport.cpp
@@ -1463,7 +1463,7 @@ std::error_code llvm::EmitImportsFiles(
StringRef ModulePath, StringRef OutputFilename,
const std::map<std::string, GVSummaryMapTy> &ModuleToSummariesForIndex) {
std::error_code EC;
- raw_fd_ostream ImportsOS(OutputFilename, EC, sys::fs::OpenFlags::OF_None);
+ raw_fd_ostream ImportsOS(OutputFilename, EC, sys::fs::OpenFlags::OF_Text);
if (EC)
return EC;
for (const auto &ILI : ModuleToSummariesForIndex)
More information about the llvm-commits
mailing list