[llvm] d3342e5 - [SystemZ][z/OS] Continue marking text files with OF_Text (#95111)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 12 06:22:24 PDT 2024
Author: Abhina Sree
Date: 2024-06-12T09:22:21-04:00
New Revision: d3342e5b922209e471b610ca1e254d9481b65319
URL: https://github.com/llvm/llvm-project/commit/d3342e5b922209e471b610ca1e254d9481b65319
DIFF: https://github.com/llvm/llvm-project/commit/d3342e5b922209e471b610ca1e254d9481b65319.diff
LOG: [SystemZ][z/OS] Continue marking text files with OF_Text (#95111)
Text files should be opened with OF_Text to have the correct encoding.
Added:
Modified:
llvm/lib/Analysis/ModuleSummaryAnalysis.cpp
llvm/lib/LTO/LTOBackend.cpp
llvm/lib/Passes/StandardInstrumentations.cpp
llvm/lib/Transforms/IPO/FunctionImport.cpp
Removed:
################################################################################
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 21aed799d6fa3..3fc67515c018b 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 68f9799616ae6..29a0a4a790721 100644
--- a/llvm/lib/Transforms/IPO/FunctionImport.cpp
+++ b/llvm/lib/Transforms/IPO/FunctionImport.cpp
@@ -1355,7 +1355,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