std::error_code EC;
std::string infoFile = outputPath;
- llvm::raw_fd_ostream infoOut(infoFile, EC, llvm::sys::fs::F_None);
+ llvm::raw_fd_ostream infoOut(infoFile, EC, llvm::sys::fs::OF_None);
if (EC)
return report(EC.message(), Diag);
Diag);
std::error_code EC;
- llvm::raw_fd_ostream Out(origFE->getName(), EC, llvm::sys::fs::F_None);
+ llvm::raw_fd_ostream Out(origFE->getName(), EC, llvm::sys::fs::OF_None);
if (EC)
return report(EC.message(), Diag);
if (IsOutputFile) {
std::error_code EC;
- llvm::raw_fd_ostream OS(MigrateDir, EC, llvm::sys::fs::F_None);
+ llvm::raw_fd_ostream OS(MigrateDir, EC, llvm::sys::fs::OF_None);
if (EC) {
DiagnosticsEngine &Diags = Ctx.getDiagnostics();
Diags.Report(Diags.getCustomDiagID(DiagnosticsEngine::Error, "%0"))
}
std::error_code EC;
- llvm::raw_fd_ostream o(outPath, EC, llvm::sys::fs::F_Text);
+ llvm::raw_fd_ostream o(outPath, EC, llvm::sys::fs::OF_Text);
if (EC) {
llvm::errs() << "error: could not create file: " << outPath << '\n';
return;
std::unique_ptr<llvm::ToolOutputFile> openOutputFile(StringRef Path) {
std::error_code EC;
auto F = llvm::make_unique<llvm::ToolOutputFile>(Path, EC,
- llvm::sys::fs::F_None);
+ llvm::sys::fs::OF_None);
if (EC) {
Diags.Report(diag::err_fe_unable_to_open_output) << Path << EC.message();
F.reset();
std::error_code EC;
OwnedStream.reset(new llvm::raw_fd_ostream(
getDriver().CCPrintOptionsFilename, EC,
- llvm::sys::fs::F_Append | llvm::sys::fs::F_Text));
+ llvm::sys::fs::OF_Append | llvm::sys::fs::OF_Text));
if (EC) {
getDriver().Diag(diag::err_drv_cc_print_options_failure)
<< EC.message();
if (!CompilationDatabase) {
std::error_code EC;
- auto File = llvm::make_unique<llvm::raw_fd_ostream>(Filename, EC, llvm::sys::fs::F_Text);
+ auto File = llvm::make_unique<llvm::raw_fd_ostream>(Filename, EC,
+ llvm::sys::fs::OF_Text);
if (EC) {
D.Diag(clang::diag::err_drv_compilationdatabase) << Filename
<< EC.message();
// Open script file and write the contents.
std::error_code EC;
- llvm::raw_fd_ostream Lksf(LKS, EC, llvm::sys::fs::F_None);
+ llvm::raw_fd_ostream Lksf(LKS, EC, llvm::sys::fs::OF_None);
if (EC) {
C.getDriver().Diag(clang::diag::err_unable_to_make_temp) << EC.message();
// Open script file and write the contents.
std::error_code EC;
- llvm::raw_fd_ostream Lksf(LKS, EC, llvm::sys::fs::F_None);
+ llvm::raw_fd_ostream Lksf(LKS, EC, llvm::sys::fs::OF_None);
if (EC) {
C.getDriver().Diag(clang::diag::err_unable_to_make_temp) << EC.message();
// Create the output stream.
auto FileOS = llvm::make_unique<llvm::raw_fd_ostream>(
DiagOpts->DiagnosticLogFile, EC,
- llvm::sys::fs::F_Append | llvm::sys::fs::F_Text);
+ llvm::sys::fs::OF_Append | llvm::sys::fs::OF_Text);
if (EC) {
Diags.Report(diag::warn_fe_cc_log_diagnostics_failure)
<< DiagOpts->DiagnosticLogFile << EC.message();
OSFile = OutFile;
OS.reset(new llvm::raw_fd_ostream(
OSFile, Error,
- (Binary ? llvm::sys::fs::F_None : llvm::sys::fs::F_Text)));
+ (Binary ? llvm::sys::fs::OF_None : llvm::sys::fs::OF_Text)));
if (Error)
return nullptr;
}
StringRef StatsFile = getFrontendOpts().StatsFile;
if (!StatsFile.empty()) {
std::error_code EC;
- auto StatS = llvm::make_unique<llvm::raw_fd_ostream>(StatsFile, EC,
- llvm::sys::fs::F_Text);
+ auto StatS = llvm::make_unique<llvm::raw_fd_ostream>(
+ StatsFile, EC, llvm::sys::fs::OF_Text);
if (EC) {
getDiagnostics().Report(diag::warn_fe_unable_to_open_stats_file)
<< StatsFile << EC.message();
/// Write a new timestamp file with the given path.
static void writeTimestampFile(StringRef TimestampFile) {
std::error_code EC;
- llvm::raw_fd_ostream Out(TimestampFile.str(), EC, llvm::sys::fs::F_None);
+ llvm::raw_fd_ostream Out(TimestampFile.str(), EC, llvm::sys::fs::OF_None);
}
/// Prune the module cache of modules that haven't been accessed in
}
std::error_code EC;
- llvm::raw_fd_ostream OS(OutputFile, EC, llvm::sys::fs::F_Text);
+ llvm::raw_fd_ostream OS(OutputFile, EC, llvm::sys::fs::OF_Text);
if (EC) {
Diags.Report(diag::err_fe_error_opening) << OutputFile << EC.message();
return;
void DependencyGraphCallback::OutputGraphFile() {
std::error_code EC;
- llvm::raw_fd_ostream OS(OutputFile, EC, llvm::sys::fs::F_Text);
+ llvm::raw_fd_ostream OS(OutputFile, EC, llvm::sys::fs::OF_Text);
if (EC) {
PP->getDiagnostics().Report(diag::err_fe_error_opening) << OutputFile
<< EC.message();
if (!OutputFileName.empty() && OutputFileName != "-") {
std::error_code EC;
OutFile.reset(new llvm::raw_fd_ostream(OutputFileName.str(), EC,
- llvm::sys::fs::F_Text));
+ llvm::sys::fs::OF_Text));
}
llvm::raw_ostream &Out = OutFile.get()? *OutFile.get() : llvm::outs();
if (!OutputPath.empty()) {
std::error_code EC;
llvm::raw_fd_ostream *OS = new llvm::raw_fd_ostream(
- OutputPath.str(), EC, llvm::sys::fs::F_Append | llvm::sys::fs::F_Text);
+ OutputPath.str(), EC,
+ llvm::sys::fs::OF_Append | llvm::sys::fs::OF_Text);
if (EC) {
PP.getDiagnostics().Report(clang::diag::warn_fe_cc_print_header_failure)
<< EC.message();
std::error_code EC;
SmallString<256> YAMLPath = VFSDir;
llvm::sys::path::append(YAMLPath, "vfs.yaml");
- llvm::raw_fd_ostream OS(YAMLPath, EC, llvm::sys::fs::F_Text);
+ llvm::raw_fd_ostream OS(YAMLPath, EC, llvm::sys::fs::OF_Text);
if (EC) {
HasErrors = true;
return;
if (fd != -1) {
OS.reset(new llvm::raw_fd_ostream(fd, /*shouldClose=*/true));
} else {
- OS.reset(new llvm::raw_fd_ostream(Filename, EC, llvm::sys::fs::F_None));
+ OS.reset(new llvm::raw_fd_ostream(Filename, EC, llvm::sys::fs::OF_None));
}
if (EC) {
Diags.Report(clang::diag::err_fe_unable_to_open_output) << Filename
std::error_code EC;
auto OS = llvm::make_unique<llvm::raw_fd_ostream>(State->OutputFile.c_str(),
- EC, llvm::sys::fs::F_None);
+ EC, llvm::sys::fs::OF_None);
if (EC) {
getMetaDiags()->Report(diag::warn_fe_serialized_diag_failure)
<< State->OutputFile << EC.message();
// Overwrite the timestamp file contents so that file's mtime changes.
std::string TimestampFilename = MF.getTimestampFilename();
std::error_code EC;
- llvm::raw_fd_ostream OS(TimestampFilename, EC, llvm::sys::fs::F_Text);
+ llvm::raw_fd_ostream OS(TimestampFilename, EC, llvm::sys::fs::OF_Text);
if (EC)
return;
OS << "Timestamp file\n";
// Open the file.
std::error_code EC;
- llvm::raw_fd_ostream o(OutputFile, EC, llvm::sys::fs::F_Text);
+ llvm::raw_fd_ostream o(OutputFile, EC, llvm::sys::fs::OF_Text);
if (EC) {
llvm::errs() << "warning: could not create file: " << EC.message() << '\n';
return;
// file can become large very quickly, so decoding into JSON to append a run
// may be an expensive operation.
std::error_code EC;
- llvm::raw_fd_ostream OS(OutputFile, EC, llvm::sys::fs::F_Text);
+ llvm::raw_fd_ostream OS(OutputFile, EC, llvm::sys::fs::OF_Text);
if (EC) {
llvm::errs() << "warning: could not create file: " << EC.message() << '\n';
return;
// Write the bitcode contents to the temporary file.
{
std::error_code EC;
- raw_fd_ostream BitcodeFile(BitcodeFileName, EC, sys::fs::F_None);
+ raw_fd_ostream BitcodeFile(BitcodeFileName, EC, sys::fs::OF_None);
if (EC) {
errs() << "error: unable to open temporary file.\n";
return true;
std::error_code EC;
// Create output file.
- raw_fd_ostream OutputFile(OutputFileNames.front(), EC, sys::fs::F_None);
+ raw_fd_ostream OutputFile(OutputFileNames.front(), EC, sys::fs::OF_None);
if (EC) {
errs() << "error: Can't open file " << OutputFileNames.front() << ".\n";
// Check if the output file can be opened and copy the bundle to it.
std::error_code EC;
- raw_fd_ostream OutputFile(Output->second, EC, sys::fs::F_None);
+ raw_fd_ostream OutputFile(Output->second, EC, sys::fs::OF_None);
if (EC) {
errs() << "error: Can't open file " << Output->second << ": "
<< EC.message() << "\n";
if (Worklist.size() == TargetNames.size()) {
for (auto &E : Worklist) {
std::error_code EC;
- raw_fd_ostream OutputFile(E.second, EC, sys::fs::F_None);
+ raw_fd_ostream OutputFile(E.second, EC, sys::fs::OF_None);
if (EC) {
errs() << "error: Can't open file " << E.second << ": " << EC.message()
<< "\n";
// If we still have any elements in the worklist, create empty files for them.
for (auto &E : Worklist) {
std::error_code EC;
- raw_fd_ostream OutputFile(E.second, EC, sys::fs::F_None);
+ raw_fd_ostream OutputFile(E.second, EC, sys::fs::OF_None);
if (EC) {
errs() << "error: Can't open file " << E.second << ": " << EC.message()
<< "\n";
if (opts::Inplace) {
std::error_code EC;
- llvm::raw_fd_ostream OS(File, EC, llvm::sys::fs::F_Text);
+ llvm::raw_fd_ostream OS(File, EC, llvm::sys::fs::OF_Text);
if (EC) {
llvm::errs() << EC.message() << "\n";
return true;
if (!ExportFixes.empty()) {
std::error_code EC;
- llvm::raw_fd_ostream OS(ExportFixes, EC, llvm::sys::fs::F_None);
+ llvm::raw_fd_ostream OS(ExportFixes, EC, llvm::sys::fs::OF_None);
if (EC) {
llvm::errs() << "Error opening output file: " << EC.message() << '\n';
return 1;
std::error_code EC;
auto Out = llvm::make_unique<raw_fd_ostream>(
- Path, EC, (Binary ? sys::fs::F_None : sys::fs::F_Text));
+ Path, EC, (Binary ? sys::fs::OF_None : sys::fs::OF_Text));
if (EC) {
Diags.Report(diag::err_fe_unable_to_open_output) << Path << EC.message();
return nullptr;