Updated F_Text and F_Append

These enum cases were also updated to OF_Text and OF_Append.
This commit is contained in:
Evan Wilde
2021-06-23 14:29:52 -07:00
parent 0aafd09835
commit 8112cda531
6 changed files with 9 additions and 9 deletions

View File

@@ -251,7 +251,7 @@ public:
SmallString<256> Path(Dirname);
llvm::sys::path::append(Path, Filename);
std::error_code EC;
raw_fd_ostream Stream(Path, EC, fs::F_Append | fs::F_Text);
raw_fd_ostream Stream(Path, EC, fs::OF_Append | fs::OF_Text);
if (EC) {
llvm::errs() << "Error opening profile file '"
<< Path << "' for writing\n";
@@ -688,7 +688,7 @@ UnifiedStatsReporter::~UnifiedStatsReporter()
}
std::error_code EC;
raw_fd_ostream ostream(StatsFilename, EC, fs::F_Append | fs::F_Text);
raw_fd_ostream ostream(StatsFilename, EC, fs::OF_Append | fs::OF_Text);
if (EC) {
llvm::errs() << "Error opening -stats-output-dir file '"
<< StatsFilename << "' for writing\n";
@@ -726,7 +726,7 @@ UnifiedStatsReporter::flushTracesAndProfiles() {
if (FrontendStatsEvents && SourceMgr) {
std::error_code EC;
raw_fd_ostream tstream(TraceFilename, EC, fs::F_Append | fs::F_Text);
raw_fd_ostream tstream(TraceFilename, EC, fs::OF_Append | fs::OF_Text);
if (EC) {
llvm::errs() << "Error opening -trace-stats-events file '"
<< TraceFilename << "' for writing\n";

View File

@@ -707,7 +707,7 @@ bool swift::emitLoadedModuleTraceIfNeeded(ModuleDecl *mainModule,
if (loadedModuleTracePath.empty())
return false;
std::error_code EC;
llvm::raw_fd_ostream out(loadedModuleTracePath, EC, llvm::sys::fs::F_Append);
llvm::raw_fd_ostream out(loadedModuleTracePath, EC, llvm::sys::fs::OF_Append);
if (out.has_error() || EC) {
ctxt.Diags.diagnose(SourceLoc(), diag::error_opening_output,

View File

@@ -35,7 +35,7 @@ std::string MigrationState::getOutputText() const {
static bool quickDumpText(StringRef OutFilename, StringRef Text) {
std::error_code Error;
llvm::raw_fd_ostream FileOS(OutFilename,
Error, llvm::sys::fs::F_Text);
Error, llvm::sys::fs::OF_Text);
if (FileOS.has_error()) {
return true;
}

View File

@@ -385,7 +385,7 @@ bool Migrator::emitRemap() const {
std::error_code Error;
llvm::raw_fd_ostream FileOS(RemapPath,
Error, llvm::sys::fs::F_Text);
Error, llvm::sys::fs::OF_Text);
if (FileOS.has_error()) {
return true;
}
@@ -406,7 +406,7 @@ bool Migrator::emitMigratedFile() const {
std::error_code Error;
llvm::raw_fd_ostream FileOS(OutFilename,
Error, llvm::sys::fs::F_Text);
Error, llvm::sys::fs::OF_Text);
if (FileOS.has_error()) {
return true;
}

View File

@@ -447,7 +447,7 @@ void CallerAnalysis::dump() const { print(llvm::errs()); }
void CallerAnalysis::print(const char *filePath) const {
using namespace llvm::sys;
std::error_code error;
llvm::raw_fd_ostream fileOutputStream(filePath, error, fs::F_Text);
llvm::raw_fd_ostream fileOutputStream(filePath, error, fs::OF_Text);
if (error) {
llvm::errs() << "Failed to open path \"" << filePath << "\" for writing.!";
llvm_unreachable("default error handler");

View File

@@ -558,7 +558,7 @@ llvm::raw_ostream &stats_os() {
// Try to open the file.
std::error_code EC;
auto fd_stream = std::make_unique<llvm::raw_fd_ostream>(
SILStatsOutputFile, EC, llvm::sys::fs::OpenFlags::F_Text);
SILStatsOutputFile, EC, llvm::sys::fs::OpenFlags::OF_Text);
if (!fd_stream->has_error() && !EC) {
stats_output_stream = {fd_stream.release(),
[](llvm::raw_ostream *d) { delete d; }};