Эх сурвалжийг харах

Rename F_{None,Text,Append} to OF_{None,Text,Append}. NFC

F_{None,Text,Append} are kept for compatibility since r334221.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367800 91177308-0d34-0410-b5e6-96231b3b80d8
Fangrui Song 6 жил өмнө
parent
commit
2ffd08308b
69 өөрчлөгдсөн 105 нэмэгдсэн , 104 устгасан
  1. 1 1
      docs/tutorial/MyFirstLanguageFrontend/LangImpl08.rst
  2. 1 1
      examples/BrainF/BrainFDriver.cpp
  3. 1 1
      examples/Kaleidoscope/Chapter8/toy.cpp
  4. 2 2
      include/llvm/Analysis/DOTGraphTraitsPass.h
  5. 1 1
      lib/Analysis/CFGPrinter.cpp
  6. 1 1
      lib/Analysis/ModuleSummaryAnalysis.cpp
  7. 1 1
      lib/Bitcode/Writer/BitWriter.cpp
  8. 1 1
      lib/CodeGen/RegAllocPBQP.cpp
  9. 1 1
      lib/IR/Core.cpp
  10. 1 1
      lib/IR/RemarkStreamer.cpp
  11. 2 2
      lib/LTO/LTO.cpp
  12. 5 5
      lib/LTO/LTOBackend.cpp
  13. 1 1
      lib/LTO/LTOCodeGenerator.cpp
  14. 3 3
      lib/LTO/ThinLTOCodeGenerator.cpp
  15. 1 1
      lib/MC/MCParser/DarwinAsmParser.cpp
  16. 1 1
      lib/ProfileData/GCOV.cpp
  17. 2 2
      lib/ProfileData/SampleProfWriter.cpp
  18. 1 1
      lib/Support/CachePruning.cpp
  19. 1 1
      lib/Support/CodeGenCoverage.cpp
  20. 1 1
      lib/Support/FileCollector.cpp
  21. 1 1
      lib/Support/Timer.cpp
  22. 3 3
      lib/Support/Unix/Path.inc
  23. 1 1
      lib/Support/Unix/Program.inc
  24. 1 1
      lib/Support/Windows/Program.inc
  25. 1 1
      lib/Support/raw_ostream.cpp
  26. 2 2
      lib/TableGen/Main.cpp
  27. 1 1
      lib/Target/TargetMachineC.cpp
  28. 1 1
      lib/Transforms/IPO/FunctionImport.cpp
  29. 1 1
      lib/Transforms/IPO/LowerTypeTests.cpp
  30. 1 1
      lib/Transforms/IPO/WholeProgramDevirt.cpp
  31. 2 1
      lib/Transforms/Instrumentation/GCOVProfiling.cpp
  32. 2 1
      lib/Transforms/Instrumentation/InstrOrderFile.cpp
  33. 1 1
      tools/bugpoint/OptimizerDriver.cpp
  34. 2 2
      tools/dsymutil/dsymutil.cpp
  35. 4 4
      tools/gold/gold-plugin.cpp
  36. 3 3
      tools/llc/llc.cpp
  37. 2 2
      tools/lli/lli.cpp
  38. 1 1
      tools/llvm-ar/llvm-ar.cpp
  39. 1 1
      tools/llvm-as/llvm-as.cpp
  40. 1 1
      tools/llvm-cat/llvm-cat.cpp
  41. 1 1
      tools/llvm-cxxmap/llvm-cxxmap.cpp
  42. 1 1
      tools/llvm-dis/llvm-dis.cpp
  43. 1 1
      tools/llvm-dwp/llvm-dwp.cpp
  44. 1 1
      tools/llvm-exegesis/lib/BenchmarkResult.cpp
  45. 1 1
      tools/llvm-extract/llvm-extract.cpp
  46. 1 1
      tools/llvm-link/llvm-link.cpp
  47. 7 7
      tools/llvm-lto/llvm-lto.cpp
  48. 1 1
      tools/llvm-lto2/llvm-lto2.cpp
  49. 1 1
      tools/llvm-mc-assemble-fuzzer/llvm-mc-assemble-fuzzer.cpp
  50. 1 1
      tools/llvm-mc/llvm-mc.cpp
  51. 1 1
      tools/llvm-mca/llvm-mca.cpp
  52. 1 1
      tools/llvm-modextract/llvm-modextract.cpp
  53. 1 2
      tools/llvm-opt-report/OptReport.cpp
  54. 3 3
      tools/llvm-profdata/llvm-profdata.cpp
  55. 1 1
      tools/llvm-split/llvm-split.cpp
  56. 1 1
      tools/llvm-stress/llvm-stress.cpp
  57. 1 1
      tools/llvm-xray/xray-account.cpp
  58. 2 2
      tools/llvm-xray/xray-converter.cpp
  59. 1 1
      tools/llvm-xray/xray-extract.cpp
  60. 1 1
      tools/llvm-xray/xray-graph-diff.cpp
  61. 1 1
      tools/llvm-xray/xray-graph.cpp
  62. 3 3
      tools/opt/opt.cpp
  63. 2 2
      tools/verify-uselistorder/verify-uselistorder.cpp
  64. 1 1
      tools/yaml2obj/yaml2obj.cpp
  65. 1 1
      unittests/BinaryFormat/TestFileMagic.cpp
  66. 1 1
      unittests/DebugInfo/DWARF/DwarfGenerator.cpp
  67. 1 1
      unittests/ProfileData/SampleProfTest.cpp
  68. 3 3
      unittests/Support/Path.cpp
  69. 2 2
      unittests/Support/raw_ostream_test.cpp

+ 1 - 1
docs/tutorial/MyFirstLanguageFrontend/LangImpl08.rst

@@ -144,7 +144,7 @@ our file to:
 
   auto Filename = "output.o";
   std::error_code EC;
-  raw_fd_ostream dest(Filename, EC, sys::fs::F_None);
+  raw_fd_ostream dest(Filename, EC, sys::fs::OF_None);
 
   if (EC) {
     errs() << "Could not open file: " << EC.message();

+ 1 - 1
examples/BrainF/BrainFDriver.cpp

@@ -126,7 +126,7 @@ int main(int argc, char **argv) {
     }
     if (OutputFilename != "-") {
       std::error_code EC;
-      out = new raw_fd_ostream(OutputFilename, EC, sys::fs::F_None);
+      out = new raw_fd_ostream(OutputFilename, EC, sys::fs::OF_None);
     }
   }
 

+ 1 - 1
examples/Kaleidoscope/Chapter8/toy.cpp

@@ -1245,7 +1245,7 @@ int main() {
 
   auto Filename = "output.o";
   std::error_code EC;
-  raw_fd_ostream dest(Filename, EC, sys::fs::F_None);
+  raw_fd_ostream dest(Filename, EC, sys::fs::OF_None);
 
   if (EC) {
     errs() << "Could not open file: " << EC.message();

+ 2 - 2
include/llvm/Analysis/DOTGraphTraitsPass.h

@@ -99,7 +99,7 @@ public:
 
     errs() << "Writing '" << Filename << "'...";
 
-    raw_fd_ostream File(Filename, EC, sys::fs::F_Text);
+    raw_fd_ostream File(Filename, EC, sys::fs::OF_Text);
     std::string GraphName = DOTGraphTraits<GraphT>::getGraphName(Graph);
     std::string Title = GraphName + " for '" + F.getName().str() + "' function";
 
@@ -162,7 +162,7 @@ public:
 
     errs() << "Writing '" << Filename << "'...";
 
-    raw_fd_ostream File(Filename, EC, sys::fs::F_Text);
+    raw_fd_ostream File(Filename, EC, sys::fs::OF_Text);
     std::string Title = DOTGraphTraits<GraphT>::getGraphName(Graph);
 
     if (!EC)

+ 1 - 1
lib/Analysis/CFGPrinter.cpp

@@ -99,7 +99,7 @@ static void writeCFGToDotFile(Function &F, bool CFGOnly = false) {
   errs() << "Writing '" << Filename << "'...";
 
   std::error_code EC;
-  raw_fd_ostream File(Filename, EC, sys::fs::F_Text);
+  raw_fd_ostream File(Filename, EC, sys::fs::OF_Text);
 
   if (!EC)
     WriteGraph(File, (const Function*)&F, CFGOnly);

+ 1 - 1
lib/Analysis/ModuleSummaryAnalysis.cpp

@@ -813,7 +813,7 @@ ModuleSummaryIndex llvm::buildModuleSummaryIndex(
 
   if (!ModuleSummaryDotFile.empty()) {
     std::error_code EC;
-    raw_fd_ostream OSDot(ModuleSummaryDotFile, EC, sys::fs::OpenFlags::F_None);
+    raw_fd_ostream OSDot(ModuleSummaryDotFile, EC, sys::fs::OpenFlags::OF_None);
     if (EC)
       report_fatal_error(Twine("Failed to open dot file ") +
                          ModuleSummaryDotFile + ": " + EC.message() + "\n");

+ 1 - 1
lib/Bitcode/Writer/BitWriter.cpp

@@ -19,7 +19,7 @@ using namespace llvm;
 
 int LLVMWriteBitcodeToFile(LLVMModuleRef M, const char *Path) {
   std::error_code EC;
-  raw_fd_ostream OS(Path, EC, sys::fs::F_None);
+  raw_fd_ostream OS(Path, EC, sys::fs::OF_None);
 
   if (EC)
     return -1;

+ 1 - 1
lib/CodeGen/RegAllocPBQP.cpp

@@ -848,7 +848,7 @@ bool RegAllocPBQP::runOnMachineFunction(MachineFunction &MF) {
         std::string GraphFileName = FullyQualifiedName + "." + RS.str() +
                                     ".pbqpgraph";
         std::error_code EC;
-        raw_fd_ostream OS(GraphFileName, EC, sys::fs::F_Text);
+        raw_fd_ostream OS(GraphFileName, EC, sys::fs::OF_Text);
         LLVM_DEBUG(dbgs() << "Dumping graph for round " << Round << " to \""
                           << GraphFileName << "\"\n");
         G.dump(OS);

+ 1 - 1
lib/IR/Core.cpp

@@ -386,7 +386,7 @@ void LLVMDumpModule(LLVMModuleRef M) {
 LLVMBool LLVMPrintModuleToFile(LLVMModuleRef M, const char *Filename,
                                char **ErrorMessage) {
   std::error_code EC;
-  raw_fd_ostream dest(Filename, EC, sys::fs::F_Text);
+  raw_fd_ostream dest(Filename, EC, sys::fs::OF_Text);
   if (EC) {
     *ErrorMessage = strdup(EC.message().c_str());
     return true;

+ 1 - 1
lib/IR/RemarkStreamer.cpp

@@ -126,7 +126,7 @@ llvm::setupOptimizationRemarks(LLVMContext &Context, StringRef RemarksFilename,
 
   std::error_code EC;
   auto RemarksFile =
-      llvm::make_unique<ToolOutputFile>(RemarksFilename, EC, sys::fs::F_None);
+      llvm::make_unique<ToolOutputFile>(RemarksFilename, EC, sys::fs::OF_None);
   // We don't use llvm::FileError here because some diagnostics want the file
   // name separately.
   if (EC)

+ 2 - 2
lib/LTO/LTO.cpp

@@ -1205,7 +1205,7 @@ public:
 
     std::error_code EC;
     raw_fd_ostream OS(NewModulePath + ".thinlto.bc", EC,
-                      sys::fs::OpenFlags::F_None);
+                      sys::fs::OpenFlags::OF_None);
     if (EC)
       return errorCodeToError(EC);
     WriteIndexToFile(CombinedIndex, OS, &ModuleToSummariesForIndex);
@@ -1382,7 +1382,7 @@ lto::setupStatsFile(StringRef StatsFilename) {
   llvm::EnableStatistics(false);
   std::error_code EC;
   auto StatsFile =
-      llvm::make_unique<ToolOutputFile>(StatsFilename, EC, sys::fs::F_None);
+      llvm::make_unique<ToolOutputFile>(StatsFilename, EC, sys::fs::OF_None);
   if (EC)
     return errorCodeToError(EC);
 

+ 5 - 5
lib/LTO/LTOBackend.cpp

@@ -58,7 +58,7 @@ Error Config::addSaveTemps(std::string OutputFileName,
 
   std::error_code EC;
   ResolutionFile = llvm::make_unique<raw_fd_ostream>(
-      OutputFileName + "resolution.txt", EC, sys::fs::OpenFlags::F_Text);
+      OutputFileName + "resolution.txt", EC, sys::fs::OpenFlags::OF_Text);
   if (EC)
     return errorCodeToError(EC);
 
@@ -83,7 +83,7 @@ Error Config::addSaveTemps(std::string OutputFileName,
         PathPrefix = M.getModuleIdentifier() + ".";
       std::string Path = PathPrefix + PathSuffix + ".bc";
       std::error_code EC;
-      raw_fd_ostream OS(Path, EC, sys::fs::OpenFlags::F_None);
+      raw_fd_ostream OS(Path, EC, sys::fs::OpenFlags::OF_None);
       // Because -save-temps is a debugging feature, we report the error
       // directly and exit.
       if (EC)
@@ -103,7 +103,7 @@ Error Config::addSaveTemps(std::string OutputFileName,
   CombinedIndexHook = [=](const ModuleSummaryIndex &Index) {
     std::string Path = OutputFileName + "index.bc";
     std::error_code EC;
-    raw_fd_ostream OS(Path, EC, sys::fs::OpenFlags::F_None);
+    raw_fd_ostream OS(Path, EC, sys::fs::OpenFlags::OF_None);
     // Because -save-temps is a debugging feature, we report the error
     // directly and exit.
     if (EC)
@@ -111,7 +111,7 @@ Error Config::addSaveTemps(std::string OutputFileName,
     WriteIndexToFile(Index, OS);
 
     Path = OutputFileName + "index.dot";
-    raw_fd_ostream OSDot(Path, EC, sys::fs::OpenFlags::F_None);
+    raw_fd_ostream OSDot(Path, EC, sys::fs::OpenFlags::OF_None);
     if (EC)
       reportOpenError(Path, EC.message());
     Index.exportToDot(OSDot);
@@ -329,7 +329,7 @@ void codegen(Config &Conf, TargetMachine *TM, AddStreamFn AddStream,
 
   if (!DwoFile.empty()) {
     std::error_code EC;
-    DwoOut = llvm::make_unique<ToolOutputFile>(DwoFile, EC, sys::fs::F_None);
+    DwoOut = llvm::make_unique<ToolOutputFile>(DwoFile, EC, sys::fs::OF_None);
     if (EC)
       report_fatal_error("Failed to open " + DwoFile + ": " + EC.message());
   }

+ 1 - 1
lib/LTO/LTOCodeGenerator.cpp

@@ -229,7 +229,7 @@ bool LTOCodeGenerator::writeMergedModules(StringRef Path) {
 
   // create output file
   std::error_code EC;
-  ToolOutputFile Out(Path, EC, sys::fs::F_None);
+  ToolOutputFile Out(Path, EC, sys::fs::OF_None);
   if (EC) {
     std::string ErrMsg = "could not open bitcode file for writing: ";
     ErrMsg += Path.str() + ": " + EC.message();

+ 3 - 3
lib/LTO/ThinLTOCodeGenerator.cpp

@@ -89,7 +89,7 @@ static void saveTempBitcode(const Module &TheModule, StringRef TempDir,
   // User asked to save temps, let dump the bitcode file after import.
   std::string SaveTempPath = (TempDir + llvm::Twine(count) + Suffix).str();
   std::error_code EC;
-  raw_fd_ostream OS(SaveTempPath, EC, sys::fs::F_None);
+  raw_fd_ostream OS(SaveTempPath, EC, sys::fs::OF_None);
   if (EC)
     report_fatal_error(Twine("Failed to open ") + SaveTempPath +
                        " to save optimized bitcode\n");
@@ -845,7 +845,7 @@ ThinLTOCodeGenerator::writeGeneratedObject(int count, StringRef CacheEntryPath,
   }
   // No cache entry, just write out the buffer.
   std::error_code Err;
-  raw_fd_ostream OS(OutputPath, Err, sys::fs::F_None);
+  raw_fd_ostream OS(OutputPath, Err, sys::fs::OF_None);
   if (Err)
     report_fatal_error("Can't open output '" + OutputPath + "'\n");
   OS << OutputBuffer.getBuffer();
@@ -900,7 +900,7 @@ void ThinLTOCodeGenerator::run() {
   if (!SaveTempsDir.empty()) {
     auto SaveTempPath = SaveTempsDir + "index.bc";
     std::error_code EC;
-    raw_fd_ostream OS(SaveTempPath, EC, sys::fs::F_None);
+    raw_fd_ostream OS(SaveTempPath, EC, sys::fs::OF_None);
     if (EC)
       report_fatal_error(Twine("Failed to open ") + SaveTempPath +
                          " to save optimized bitcode\n");

+ 1 - 1
lib/MC/MCParser/DarwinAsmParser.cpp

@@ -779,7 +779,7 @@ bool DarwinAsmParser::parseDirectiveSecureLogUnique(StringRef, SMLoc IDLoc) {
   if (!OS) {
     std::error_code EC;
     auto NewOS = llvm::make_unique<raw_fd_ostream>(
-        StringRef(SecureLogFile), EC, sys::fs::F_Append | sys::fs::F_Text);
+        StringRef(SecureLogFile), EC, sys::fs::OF_Append | sys::fs::OF_Text);
     if (EC)
        return Error(IDLoc, Twine("can't open secure log file: ") +
                                SecureLogFile + " (" + EC.message() + ")");

+ 1 - 1
lib/ProfileData/GCOV.cpp

@@ -706,7 +706,7 @@ FileInfo::openCoveragePath(StringRef CoveragePath) {
 
   std::error_code EC;
   auto OS =
-      llvm::make_unique<raw_fd_ostream>(CoveragePath, EC, sys::fs::F_Text);
+      llvm::make_unique<raw_fd_ostream>(CoveragePath, EC, sys::fs::OF_Text);
   if (EC) {
     errs() << EC.message() << "\n";
     return llvm::make_unique<raw_null_ostream>();

+ 2 - 2
lib/ProfileData/SampleProfWriter.cpp

@@ -350,9 +350,9 @@ SampleProfileWriter::create(StringRef Filename, SampleProfileFormat Format) {
   std::error_code EC;
   std::unique_ptr<raw_ostream> OS;
   if (Format == SPF_Binary || Format == SPF_Compact_Binary)
-    OS.reset(new raw_fd_ostream(Filename, EC, sys::fs::F_None));
+    OS.reset(new raw_fd_ostream(Filename, EC, sys::fs::OF_None));
   else
-    OS.reset(new raw_fd_ostream(Filename, EC, sys::fs::F_Text));
+    OS.reset(new raw_fd_ostream(Filename, EC, sys::fs::OF_Text));
   if (EC)
     return EC;
 

+ 1 - 1
lib/Support/CachePruning.cpp

@@ -45,7 +45,7 @@ struct FileInfo {
 /// interval option.
 static void writeTimestampFile(StringRef TimestampFile) {
   std::error_code EC;
-  raw_fd_ostream Out(TimestampFile.str(), EC, sys::fs::F_None);
+  raw_fd_ostream Out(TimestampFile.str(), EC, sys::fs::OF_None);
 }
 
 static Expected<std::chrono::seconds> parseDuration(StringRef Duration) {

+ 1 - 1
lib/Support/CodeGenCoverage.cpp

@@ -101,7 +101,7 @@ bool CodeGenCoverage::emit(StringRef CoveragePrefix,
     std::string CoverageFilename = (CoveragePrefix + Pid).str();
 
     std::error_code EC;
-    sys::fs::OpenFlags OpenFlags = sys::fs::F_Append;
+    sys::fs::OpenFlags OpenFlags = sys::fs::OF_Append;
     std::unique_ptr<ToolOutputFile> CoverageFile =
         llvm::make_unique<ToolOutputFile>(CoverageFilename, EC, OpenFlags);
     if (EC)

+ 1 - 1
lib/Support/FileCollector.cpp

@@ -179,7 +179,7 @@ std::error_code FileCollector::writeMapping(StringRef mapping_file) {
   VFSWriter.setUseExternalNames(false);
 
   std::error_code EC;
-  raw_fd_ostream os(mapping_file, EC, sys::fs::F_Text);
+  raw_fd_ostream os(mapping_file, EC, sys::fs::OF_Text);
   if (EC)
     return EC;
 

+ 1 - 1
lib/Support/Timer.cpp

@@ -68,7 +68,7 @@ std::unique_ptr<raw_fd_ostream> llvm::CreateInfoOutputFile() {
   // info output file before running commands which write to it.
   std::error_code EC;
   auto Result = llvm::make_unique<raw_fd_ostream>(
-      OutputFilename, EC, sys::fs::F_Append | sys::fs::F_Text);
+      OutputFilename, EC, sys::fs::OF_Append | sys::fs::OF_Text);
   if (!EC)
     return Result;
 

+ 3 - 3
lib/Support/Unix/Path.inc

@@ -887,9 +887,9 @@ static int nativeOpenFlags(CreationDisposition Disp, OpenFlags Flags,
   else if (Access == (FA_Read | FA_Write))
     Result |= O_RDWR;
 
-  // This is for compatibility with old code that assumed F_Append implied
+  // This is for compatibility with old code that assumed OF_Append implied
   // would open an existing file.  See Windows/Path.inc for a longer comment.
-  if (Flags & F_Append)
+  if (Flags & OF_Append)
     Disp = CD_OpenAlways;
 
   if (Disp == CD_CreateNew) {
@@ -904,7 +904,7 @@ static int nativeOpenFlags(CreationDisposition Disp, OpenFlags Flags,
     // Nothing special, just don't add O_CREAT and we get these semantics.
   }
 
-  if (Flags & F_Append)
+  if (Flags & OF_Append)
     Result |= O_APPEND;
 
 #ifdef O_CLOEXEC

+ 1 - 1
lib/Support/Unix/Program.inc

@@ -444,7 +444,7 @@ std::error_code
 llvm::sys::writeFileWithEncoding(StringRef FileName, StringRef Contents,
                                  WindowsEncodingMethod Encoding /*unused*/) {
   std::error_code EC;
-  llvm::raw_fd_ostream OS(FileName, EC, llvm::sys::fs::OpenFlags::F_Text);
+  llvm::raw_fd_ostream OS(FileName, EC, llvm::sys::fs::OpenFlags::OF_Text);
 
   if (EC)
     return EC;

+ 1 - 1
lib/Support/Windows/Program.inc

@@ -470,7 +470,7 @@ std::error_code
 llvm::sys::writeFileWithEncoding(StringRef FileName, StringRef Contents,
                                  WindowsEncodingMethod Encoding) {
   std::error_code EC;
-  llvm::raw_fd_ostream OS(FileName, EC, llvm::sys::fs::F_Text);
+  llvm::raw_fd_ostream OS(FileName, EC, llvm::sys::fs::OF_Text);
   if (EC)
     return EC;
 

+ 1 - 1
lib/Support/raw_ostream.cpp

@@ -843,7 +843,7 @@ void raw_fd_ostream::anchor() {}
 raw_ostream &llvm::outs() {
   // Set buffer settings to model stdout behavior.
   std::error_code EC;
-  static raw_fd_ostream S("-", EC, sys::fs::F_None);
+  static raw_fd_ostream S("-", EC, sys::fs::OF_None);
   assert(!EC);
   return S;
 }

+ 2 - 2
lib/TableGen/Main.cpp

@@ -64,7 +64,7 @@ static int createDependencyFile(const TGParser &Parser, const char *argv0) {
     return reportError(argv0, "the option -d must be used together with -o\n");
 
   std::error_code EC;
-  ToolOutputFile DepOut(DependFilename, EC, sys::fs::F_Text);
+  ToolOutputFile DepOut(DependFilename, EC, sys::fs::OF_Text);
   if (EC)
     return reportError(argv0, "error opening " + DependFilename + ":" +
                                   EC.message() + "\n");
@@ -122,7 +122,7 @@ int llvm::TableGenMain(char *argv0, TableGenMainFn *MainFn) {
       return 0;
 
   std::error_code EC;
-  ToolOutputFile OutFile(OutputFilename, EC, sys::fs::F_Text);
+  ToolOutputFile OutFile(OutputFilename, EC, sys::fs::OF_Text);
   if (EC)
     return reportError(argv0, "error opening " + OutputFilename + ":" +
                                   EC.message() + "\n");

+ 1 - 1
lib/Target/TargetMachineC.cpp

@@ -219,7 +219,7 @@ static LLVMBool LLVMTargetMachineEmit(LLVMTargetMachineRef T, LLVMModuleRef M,
 LLVMBool LLVMTargetMachineEmitToFile(LLVMTargetMachineRef T, LLVMModuleRef M,
   char* Filename, LLVMCodeGenFileType codegen, char** ErrorMessage) {
   std::error_code EC;
-  raw_fd_ostream dest(Filename, EC, sys::fs::F_None);
+  raw_fd_ostream dest(Filename, EC, sys::fs::OF_None);
   if (EC) {
     *ErrorMessage = strdup(EC.message().c_str());
     return true;

+ 1 - 1
lib/Transforms/IPO/FunctionImport.cpp

@@ -892,7 +892,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::F_None);
+  raw_fd_ostream ImportsOS(OutputFilename, EC, sys::fs::OpenFlags::OF_None);
   if (EC)
     return EC;
   for (auto &ILI : ModuleToSummariesForIndex)

+ 1 - 1
lib/Transforms/IPO/LowerTypeTests.cpp

@@ -1630,7 +1630,7 @@ bool LowerTypeTestsModule::runForTesting(Module &M) {
     ExitOnError ExitOnErr("-lowertypetests-write-summary: " + ClWriteSummary +
                           ": ");
     std::error_code EC;
-    raw_fd_ostream OS(ClWriteSummary, EC, sys::fs::F_Text);
+    raw_fd_ostream OS(ClWriteSummary, EC, sys::fs::OF_Text);
     ExitOnErr(errorCodeToError(EC));
 
     yaml::Output Out(OS);

+ 1 - 1
lib/Transforms/IPO/WholeProgramDevirt.cpp

@@ -771,7 +771,7 @@ bool DevirtModule::runForTesting(
     ExitOnError ExitOnErr(
         "-wholeprogramdevirt-write-summary: " + ClWriteSummary + ": ");
     std::error_code EC;
-    raw_fd_ostream OS(ClWriteSummary, EC, sys::fs::F_Text);
+    raw_fd_ostream OS(ClWriteSummary, EC, sys::fs::OF_Text);
     ExitOnErr(errorCodeToError(EC));
 
     yaml::Output Out(OS);

+ 2 - 1
lib/Transforms/Instrumentation/GCOVProfiling.cpp

@@ -669,7 +669,8 @@ void GCOVProfiler::emitProfileNotes() {
       continue;
 
     std::error_code EC;
-    raw_fd_ostream out(mangleName(CU, GCovFileType::GCNO), EC, sys::fs::F_None);
+    raw_fd_ostream out(mangleName(CU, GCovFileType::GCNO), EC,
+                       sys::fs::OF_None);
     if (EC) {
       Ctx->emitError(Twine("failed to open coverage notes file for writing: ") +
                      EC.message());

+ 2 - 1
lib/Transforms/Instrumentation/InstrOrderFile.cpp

@@ -100,7 +100,8 @@ public:
     if (!ClOrderFileWriteMapping.empty()) {
       std::lock_guard<std::mutex> LogLock(MappingMutex);
       std::error_code EC;
-      llvm::raw_fd_ostream OS(ClOrderFileWriteMapping, EC, llvm::sys::fs::F_Append);
+      llvm::raw_fd_ostream OS(ClOrderFileWriteMapping, EC,
+                              llvm::sys::fs::OF_Append);
       if (EC) {
         report_fatal_error(Twine("Failed to open ") + ClOrderFileWriteMapping +
                            " to save mapping file for order file instrumentation\n");

+ 1 - 1
tools/bugpoint/OptimizerDriver.cpp

@@ -79,7 +79,7 @@ bool BugDriver::writeProgramToFile(int FD, const Module &M) const {
 bool BugDriver::writeProgramToFile(const std::string &Filename,
                                    const Module &M) const {
   std::error_code EC;
-  ToolOutputFile Out(Filename, EC, sys::fs::F_None);
+  ToolOutputFile Out(Filename, EC, sys::fs::OF_None);
   if (!EC)
     return writeProgramToFileAux(Out, M);
   return true;

+ 2 - 2
tools/dsymutil/dsymutil.cpp

@@ -178,7 +178,7 @@ static Error createPlistFile(llvm::StringRef Bin, llvm::StringRef BundleRoot) {
   llvm::SmallString<128> InfoPlist(BundleRoot);
   llvm::sys::path::append(InfoPlist, "Contents/Info.plist");
   std::error_code EC;
-  llvm::raw_fd_ostream PL(InfoPlist, EC, llvm::sys::fs::F_Text);
+  llvm::raw_fd_ostream PL(InfoPlist, EC, llvm::sys::fs::OF_Text);
   if (EC)
     return make_error<StringError>(
         "cannot create Plist: " + toString(errorCodeToError(EC)), EC);
@@ -584,7 +584,7 @@ int main(int argc, char **argv) {
       } else {
         std::error_code EC;
         OS = std::make_shared<raw_fd_ostream>(NoOutput ? "-" : OutputFile, EC,
-                                              sys::fs::F_None);
+                                              sys::fs::OF_None);
         if (EC) {
           WithColor::error() << OutputFile << ": " << EC.message();
           return 1;

+ 4 - 4
tools/gold/gold-plugin.cpp

@@ -886,7 +886,7 @@ static std::unique_ptr<LTO> createLTO(IndexWriteCallback OnIndexWrite,
   case options::OT_BC_ONLY:
     Conf.PostInternalizeModuleHook = [](size_t Task, const Module &M) {
       std::error_code EC;
-      raw_fd_ostream OS(output_name, EC, sys::fs::OpenFlags::F_None);
+      raw_fd_ostream OS(output_name, EC, sys::fs::OpenFlags::OF_None);
       if (EC)
         message(LDPL_FATAL, "Failed to write the output file.");
       WriteBitcodeToFile(M, OS, /* ShouldPreserveUseListOrder */ false);
@@ -947,7 +947,7 @@ static void writeEmptyDistributedBuildOutputs(const std::string &ModulePath,
   std::error_code EC;
   {
     raw_fd_ostream OS(NewModulePath + ".thinlto.bc", EC,
-                      sys::fs::OpenFlags::F_None);
+                      sys::fs::OpenFlags::OF_None);
     if (EC)
       message(LDPL_FATAL, "Failed to write '%s': %s",
               (NewModulePath + ".thinlto.bc").c_str(), EC.message().c_str());
@@ -960,7 +960,7 @@ static void writeEmptyDistributedBuildOutputs(const std::string &ModulePath,
   }
   if (options::thinlto_emit_imports_files) {
     raw_fd_ostream OS(NewModulePath + ".imports", EC,
-                      sys::fs::OpenFlags::F_None);
+                      sys::fs::OpenFlags::OF_None);
     if (EC)
       message(LDPL_FATAL, "Failed to write '%s': %s",
               (NewModulePath + ".imports").c_str(), EC.message().c_str());
@@ -975,7 +975,7 @@ static std::unique_ptr<raw_fd_ostream> CreateLinkedObjectsFile() {
   assert(options::thinlto_index_only);
   std::error_code EC;
   auto LinkedObjectsFile = llvm::make_unique<raw_fd_ostream>(
-      options::thinlto_linked_objects_file, EC, sys::fs::OpenFlags::F_None);
+      options::thinlto_linked_objects_file, EC, sys::fs::OpenFlags::OF_None);
   if (EC)
     message(LDPL_FATAL, "Failed to create '%s': %s",
             options::thinlto_linked_objects_file.c_str(), EC.message().c_str());

+ 3 - 3
tools/llc/llc.cpp

@@ -239,9 +239,9 @@ static std::unique_ptr<ToolOutputFile> GetOutputStream(const char *TargetName,
 
   // Open the file.
   std::error_code EC;
-  sys::fs::OpenFlags OpenFlags = sys::fs::F_None;
+  sys::fs::OpenFlags OpenFlags = sys::fs::OF_None;
   if (!Binary)
-    OpenFlags |= sys::fs::F_Text;
+    OpenFlags |= sys::fs::OF_Text;
   auto FDOut = llvm::make_unique<ToolOutputFile>(OutputFilename, EC, OpenFlags);
   if (EC) {
     WithColor::error() << EC.message() << '\n';
@@ -480,7 +480,7 @@ static int compileModule(char **argv, LLVMContext &Context) {
   if (!SplitDwarfOutputFile.empty()) {
     std::error_code EC;
     DwoOut = llvm::make_unique<ToolOutputFile>(SplitDwarfOutputFile, EC,
-                                               sys::fs::F_None);
+                                               sys::fs::OF_None);
     if (EC) {
       WithColor::error(errs(), argv[0]) << EC.message() << '\n';
       return 1;

+ 2 - 2
tools/lli/lli.cpp

@@ -251,7 +251,7 @@ public:
       sys::fs::create_directories(Twine(dir));
     }
     std::error_code EC;
-    raw_fd_ostream outfile(CacheName, EC, sys::fs::F_None);
+    raw_fd_ostream outfile(CacheName, EC, sys::fs::OF_None);
     outfile.write(Obj.getBufferStart(), Obj.getBufferSize());
     outfile.close();
   }
@@ -726,7 +726,7 @@ static std::function<void(Module &)> createDebugDumper() {
   case DumpKind::DumpModsToDisk:
     return [](Module &M) {
       std::error_code EC;
-      raw_fd_ostream Out(M.getModuleIdentifier() + ".ll", EC, sys::fs::F_Text);
+      raw_fd_ostream Out(M.getModuleIdentifier() + ".ll", EC, sys::fs::OF_Text);
       if (EC) {
         errs() << "Couldn't open " << M.getModuleIdentifier()
                << " for dumping.\nError:" << EC.message() << "\n";

+ 1 - 1
tools/llvm-ar/llvm-ar.cpp

@@ -489,7 +489,7 @@ static void doExtract(StringRef Name, const object::Archive::Child &C) {
   int FD;
   failIfError(sys::fs::openFileForWrite(sys::path::filename(Name), FD,
                                         sys::fs::CD_CreateAlways,
-                                        sys::fs::F_None, Mode),
+                                        sys::fs::OF_None, Mode),
               Name);
 
   {

+ 1 - 1
tools/llvm-as/llvm-as.cpp

@@ -82,7 +82,7 @@ static void WriteOutputFile(const Module *M, const ModuleSummaryIndex *Index) {
 
   std::error_code EC;
   std::unique_ptr<ToolOutputFile> Out(
-      new ToolOutputFile(OutputFilename, EC, sys::fs::F_None));
+      new ToolOutputFile(OutputFilename, EC, sys::fs::OF_None));
   if (EC) {
     errs() << EC.message() << '\n';
     exit(1);

+ 1 - 1
tools/llvm-cat/llvm-cat.cpp

@@ -85,7 +85,7 @@ int main(int argc, char **argv) {
   }
 
   std::error_code EC;
-  raw_fd_ostream OS(OutputFilename, EC, sys::fs::OpenFlags::F_None);
+  raw_fd_ostream OS(OutputFilename, EC, sys::fs::OpenFlags::OF_None);
   if (EC) {
     errs() << argv[0] << ": cannot open " << OutputFilename << " for writing: "
            << EC.message();

+ 1 - 1
tools/llvm-cxxmap/llvm-cxxmap.cpp

@@ -145,7 +145,7 @@ int main(int argc, const char *argv[]) {
     exitWithErrorCode(RemappingBufOrError.getError(), RemappingFile);
 
   std::error_code EC;
-  raw_fd_ostream OS(OutputFilename.data(), EC, sys::fs::F_Text);
+  raw_fd_ostream OS(OutputFilename.data(), EC, sys::fs::OF_Text);
   if (EC)
     exitWithErrorCode(EC, OutputFilename);
 

+ 1 - 1
tools/llvm-dis/llvm-dis.cpp

@@ -186,7 +186,7 @@ int main(int argc, char **argv) {
 
   std::error_code EC;
   std::unique_ptr<ToolOutputFile> Out(
-      new ToolOutputFile(OutputFilename, EC, sys::fs::F_None));
+      new ToolOutputFile(OutputFilename, EC, sys::fs::OF_None));
   if (EC) {
     errs() << EC.message() << '\n';
     return 1;

+ 1 - 1
tools/llvm-dwp/llvm-dwp.cpp

@@ -703,7 +703,7 @@ int main(int argc, char **argv) {
 
   // Create the output file.
   std::error_code EC;
-  ToolOutputFile OutFile(OutputFilename, EC, sys::fs::F_None);
+  ToolOutputFile OutFile(OutputFilename, EC, sys::fs::OF_None);
   Optional<buffer_ostream> BOS;
   raw_pwrite_stream *OS;
   if (EC)

+ 1 - 1
tools/llvm-exegesis/lib/BenchmarkResult.cpp

@@ -406,7 +406,7 @@ llvm::Error InstructionBenchmark::writeYaml(const LLVMState &State,
     int ResultFD = 0;
     if (auto E = llvm::errorCodeToError(
             openFileForWrite(Filename, ResultFD, llvm::sys::fs::CD_CreateAlways,
-                             llvm::sys::fs::F_Text))) {
+                             llvm::sys::fs::OF_Text))) {
       return E;
     }
     llvm::raw_fd_ostream Ostr(ResultFD, true /*shouldClose*/);

+ 1 - 1
tools/llvm-extract/llvm-extract.cpp

@@ -350,7 +350,7 @@ int main(int argc, char **argv) {
   Passes.add(createStripDeadPrototypesPass());   // Remove dead func decls
 
   std::error_code EC;
-  ToolOutputFile Out(OutputFilename, EC, sys::fs::F_None);
+  ToolOutputFile Out(OutputFilename, EC, sys::fs::OF_None);
   if (EC) {
     errs() << EC.message() << '\n';
     return 1;

+ 1 - 1
tools/llvm-link/llvm-link.cpp

@@ -381,7 +381,7 @@ int main(int argc, char **argv) {
     errs() << "Here's the assembly:\n" << *Composite;
 
   std::error_code EC;
-  ToolOutputFile Out(OutputFilename, EC, sys::fs::F_None);
+  ToolOutputFile Out(OutputFilename, EC, sys::fs::OF_None);
   if (EC) {
     WithColor::error() << EC.message() << '\n';
     return 1;

+ 7 - 7
tools/llvm-lto/llvm-lto.cpp

@@ -420,7 +420,7 @@ static void createCombinedModuleSummaryIndex() {
   std::error_code EC;
   assert(!OutputFilename.empty());
   raw_fd_ostream OS(OutputFilename + ".thinlto.bc", EC,
-                    sys::fs::OpenFlags::F_None);
+                    sys::fs::OpenFlags::OF_None);
   error(EC, "error opening the file '" + OutputFilename + ".thinlto.bc'");
   WriteIndexToFile(CombinedIndex, OS);
   OS.close();
@@ -510,7 +510,7 @@ static std::unique_ptr<Module> loadModuleFromInput(lto::InputFile &File,
 
 static void writeModuleToFile(Module &TheModule, StringRef Filename) {
   std::error_code EC;
-  raw_fd_ostream OS(Filename, EC, sys::fs::OpenFlags::F_None);
+  raw_fd_ostream OS(Filename, EC, sys::fs::OpenFlags::OF_None);
   error(EC, "error opening the file '" + Filename + "'");
   maybeVerifyModule(TheModule);
   WriteBitcodeToFile(TheModule, OS, /* ShouldPreserveUseListOrder */ true);
@@ -581,7 +581,7 @@ private:
     if (!CombinedIndex)
       report_fatal_error("ThinLink didn't create an index");
     std::error_code EC;
-    raw_fd_ostream OS(OutputFilename, EC, sys::fs::OpenFlags::F_None);
+    raw_fd_ostream OS(OutputFilename, EC, sys::fs::OpenFlags::OF_None);
     error(EC, "error opening the file '" + OutputFilename + "'");
     WriteIndexToFile(*CombinedIndex, OS);
   }
@@ -619,7 +619,7 @@ private:
       }
       OutputName = getThinLTOOutputFile(OutputName, OldPrefix, NewPrefix);
       std::error_code EC;
-      raw_fd_ostream OS(OutputName, EC, sys::fs::OpenFlags::F_None);
+      raw_fd_ostream OS(OutputName, EC, sys::fs::OpenFlags::OF_None);
       error(EC, "error opening the file '" + OutputName + "'");
       WriteIndexToFile(*Index, OS, &ModuleToSummariesForIndex);
     }
@@ -802,7 +802,7 @@ private:
       }
 
       std::error_code EC;
-      raw_fd_ostream OS(OutputName, EC, sys::fs::OpenFlags::F_None);
+      raw_fd_ostream OS(OutputName, EC, sys::fs::OpenFlags::OF_None);
       error(EC, "error opening the file '" + OutputName + "'");
       OS << std::get<0>(BinName)->getBuffer();
     }
@@ -848,7 +848,7 @@ private:
     for (unsigned BufID = 0; BufID < Binaries.size(); ++BufID) {
       auto OutputName = InputFilenames[BufID] + ".thinlto.o";
       std::error_code EC;
-      raw_fd_ostream OS(OutputName, EC, sys::fs::OpenFlags::F_None);
+      raw_fd_ostream OS(OutputName, EC, sys::fs::OpenFlags::OF_None);
       error(EC, "error opening the file '" + OutputName + "'");
       OS << Binaries[BufID]->getBuffer();
     }
@@ -1020,7 +1020,7 @@ int main(int argc, char **argv) {
       if (Parallelism != 1)
         PartFilename += "." + utostr(I);
       std::error_code EC;
-      OSs.emplace_back(PartFilename, EC, sys::fs::F_None);
+      OSs.emplace_back(PartFilename, EC, sys::fs::OF_None);
       if (EC)
         error("error opening the file '" + PartFilename + "': " + EC.message());
       OSPtrs.push_back(&OSs.back().os());

+ 1 - 1
tools/llvm-lto2/llvm-lto2.cpp

@@ -333,7 +333,7 @@ static int run(int argc, char **argv) {
     std::string Path = OutputFilename + "." + utostr(Task);
 
     std::error_code EC;
-    auto S = llvm::make_unique<raw_fd_ostream>(Path, EC, sys::fs::F_None);
+    auto S = llvm::make_unique<raw_fd_ostream>(Path, EC, sys::fs::OF_None);
     check(EC, Path);
     return llvm::make_unique<lto::NativeObjectStream>(std::move(S));
   };

+ 1 - 1
tools/llvm-mc-assemble-fuzzer/llvm-mc-assemble-fuzzer.cpp

@@ -211,7 +211,7 @@ int AssembleOneInput(const uint8_t *Data, size_t Size) {
     std::error_code EC;
     const std::string OutputFilename = "-";
     auto Out =
-        llvm::make_unique<ToolOutputFile>(OutputFilename, EC, sys::fs::F_None);
+        llvm::make_unique<ToolOutputFile>(OutputFilename, EC, sys::fs::OF_None);
     if (EC) {
       errs() << EC.message() << '\n';
       abort();

+ 1 - 1
tools/llvm-mc/llvm-mc.cpp

@@ -211,7 +211,7 @@ static const Target *GetTarget(const char *ProgName) {
 
 static std::unique_ptr<ToolOutputFile> GetOutputStream(StringRef Path) {
   std::error_code EC;
-  auto Out = llvm::make_unique<ToolOutputFile>(Path, EC, sys::fs::F_None);
+  auto Out = llvm::make_unique<ToolOutputFile>(Path, EC, sys::fs::OF_None);
   if (EC) {
     WithColor::error() << EC.message() << '\n';
     return nullptr;

+ 1 - 1
tools/llvm-mca/llvm-mca.cpp

@@ -222,7 +222,7 @@ ErrorOr<std::unique_ptr<ToolOutputFile>> getOutputStream() {
     OutputFilename = "-";
   std::error_code EC;
   auto Out =
-      llvm::make_unique<ToolOutputFile>(OutputFilename, EC, sys::fs::F_None);
+      llvm::make_unique<ToolOutputFile>(OutputFilename, EC, sys::fs::OF_None);
   if (!EC)
     return std::move(Out);
   return EC;

+ 1 - 1
tools/llvm-modextract/llvm-modextract.cpp

@@ -54,7 +54,7 @@ int main(int argc, char **argv) {
 
   std::error_code EC;
   std::unique_ptr<ToolOutputFile> Out(
-      new ToolOutputFile(OutputFilename, EC, sys::fs::F_None));
+      new ToolOutputFile(OutputFilename, EC, sys::fs::OF_None));
   ExitOnErr(errorCodeToError(EC));
 
   if (BinaryExtract) {

+ 1 - 2
tools/llvm-opt-report/OptReport.cpp

@@ -242,8 +242,7 @@ static bool readLocationInfo(LocationInfoTy &LocationInfo) {
 
 static bool writeReport(LocationInfoTy &LocationInfo) {
   std::error_code EC;
-  llvm::raw_fd_ostream OS(OutputFileName, EC,
-              llvm::sys::fs::F_Text);
+  llvm::raw_fd_ostream OS(OutputFileName, EC, llvm::sys::fs::OF_Text);
   if (EC) {
     WithColor::error() << "Can't open file " << OutputFileName << ": "
                        << EC.message() << "\n";

+ 3 - 3
tools/llvm-profdata/llvm-profdata.cpp

@@ -380,7 +380,7 @@ static void mergeInstrProfile(const WeightedFileVector &Inputs,
   }
 
   std::error_code EC;
-  raw_fd_ostream Output(OutputFilename.data(), EC, sys::fs::F_None);
+  raw_fd_ostream Output(OutputFilename.data(), EC, sys::fs::OF_None);
   if (EC)
     exitWithErrorCode(EC, OutputFilename);
 
@@ -682,7 +682,7 @@ static int overlap_main(int argc, const char *argv[]) {
   cl::ParseCommandLineOptions(argc, argv, "LLVM profile data overlap tool\n");
 
   std::error_code EC;
-  raw_fd_ostream OS(Output.data(), EC, sys::fs::F_Text);
+  raw_fd_ostream OS(Output.data(), EC, sys::fs::OF_Text);
   if (EC)
     exitWithErrorCode(EC, Output);
 
@@ -1027,7 +1027,7 @@ static int show_main(int argc, const char *argv[]) {
   }
 
   std::error_code EC;
-  raw_fd_ostream OS(OutputFilename.data(), EC, sys::fs::F_Text);
+  raw_fd_ostream OS(OutputFilename.data(), EC, sys::fs::OF_Text);
   if (EC)
     exitWithErrorCode(EC, OutputFilename);
 

+ 1 - 1
tools/llvm-split/llvm-split.cpp

@@ -55,7 +55,7 @@ int main(int argc, char **argv) {
   SplitModule(std::move(M), NumOutputs, [&](std::unique_ptr<Module> MPart) {
     std::error_code EC;
     std::unique_ptr<ToolOutputFile> Out(
-        new ToolOutputFile(OutputFilename + utostr(I++), EC, sys::fs::F_None));
+        new ToolOutputFile(OutputFilename + utostr(I++), EC, sys::fs::OF_None));
     if (EC) {
       errs() << EC.message() << '\n';
       exit(1);

+ 1 - 1
tools/llvm-stress/llvm-stress.cpp

@@ -752,7 +752,7 @@ int main(int argc, char **argv) {
     OutputFilename = "-";
 
   std::error_code EC;
-  Out.reset(new ToolOutputFile(OutputFilename, EC, sys::fs::F_None));
+  Out.reset(new ToolOutputFile(OutputFilename, EC, sys::fs::OF_None));
   if (EC) {
     errs() << EC.message() << '\n';
     return 1;

+ 1 - 1
tools/llvm-xray/xray-account.cpp

@@ -421,7 +421,7 @@ static CommandRegistration Unused(&Account, []() -> Error {
   }
 
   std::error_code EC;
-  raw_fd_ostream OS(AccountOutput, EC, sys::fs::OpenFlags::F_Text);
+  raw_fd_ostream OS(AccountOutput, EC, sys::fs::OpenFlags::OF_Text);
   if (EC)
     return make_error<StringError>(
         Twine("Cannot open file '") + AccountOutput + "' for writing.", EC);

+ 2 - 2
tools/llvm-xray/xray-converter.cpp

@@ -387,8 +387,8 @@ static CommandRegistration Unused(&Convert, []() -> Error {
   std::error_code EC;
   raw_fd_ostream OS(ConvertOutput, EC,
                     ConvertOutputFormat == ConvertFormats::BINARY
-                        ? sys::fs::OpenFlags::F_None
-                        : sys::fs::OpenFlags::F_Text);
+                        ? sys::fs::OpenFlags::OF_None
+                        : sys::fs::OpenFlags::OF_Text);
   if (EC)
     return make_error<StringError>(
         Twine("Cannot open file '") + ConvertOutput + "' for writing.", EC);

+ 1 - 1
tools/llvm-xray/xray-extract.cpp

@@ -80,7 +80,7 @@ static CommandRegistration Unused(&Extract, []() -> Error {
                       InstrumentationMapOrError.takeError());
 
   std::error_code EC;
-  raw_fd_ostream OS(ExtractOutput, EC, sys::fs::OpenFlags::F_Text);
+  raw_fd_ostream OS(ExtractOutput, EC, sys::fs::OpenFlags::OF_Text);
   if (EC)
     return make_error<StringError>(
         Twine("Cannot open file '") + ExtractOutput + "' for writing.", EC);

+ 1 - 1
tools/llvm-xray/xray-graph-diff.cpp

@@ -470,7 +470,7 @@ static CommandRegistration Unused(&GraphDiff, []() -> Error {
   auto &GDR = *GDROrErr;
 
   std::error_code EC;
-  raw_fd_ostream OS(GraphDiffOutput, EC, sys::fs::OpenFlags::F_Text);
+  raw_fd_ostream OS(GraphDiffOutput, EC, sys::fs::OpenFlags::OF_Text);
   if (EC)
     return make_error<StringError>(
         Twine("Cannot open file '") + GraphDiffOutput + "' for writing.", EC);

+ 1 - 1
tools/llvm-xray/xray-graph.cpp

@@ -506,7 +506,7 @@ static CommandRegistration Unused(&GraphC, []() -> Error {
   auto &GR = *GROrError;
 
   std::error_code EC;
-  raw_fd_ostream OS(GraphOutput, EC, sys::fs::OpenFlags::F_Text);
+  raw_fd_ostream OS(GraphOutput, EC, sys::fs::OpenFlags::OF_Text);
   if (EC)
     return make_error<StringError>(
         Twine("Cannot open file '") + GraphOutput + "' for writing.", EC);

+ 3 - 3
tools/opt/opt.cpp

@@ -612,7 +612,7 @@ int main(int argc, char **argv) {
       OutputFilename = "-";
 
     std::error_code EC;
-    Out.reset(new ToolOutputFile(OutputFilename, EC, sys::fs::F_None));
+    Out.reset(new ToolOutputFile(OutputFilename, EC, sys::fs::OF_None));
     if (EC) {
       errs() << EC.message() << '\n';
       return 1;
@@ -620,7 +620,7 @@ int main(int argc, char **argv) {
 
     if (!ThinLinkBitcodeFile.empty()) {
       ThinLinkOut.reset(
-          new ToolOutputFile(ThinLinkBitcodeFile, EC, sys::fs::F_None));
+          new ToolOutputFile(ThinLinkBitcodeFile, EC, sys::fs::OF_None));
       if (EC) {
         errs() << EC.message() << '\n';
         return 1;
@@ -721,7 +721,7 @@ int main(int argc, char **argv) {
 
       std::error_code EC;
       Out = llvm::make_unique<ToolOutputFile>(OutputFilename, EC,
-                                              sys::fs::F_None);
+                                              sys::fs::OF_None);
       if (EC) {
         errs() << EC.message() << '\n';
         return 1;

+ 2 - 2
tools/verify-uselistorder/verify-uselistorder.cpp

@@ -123,7 +123,7 @@ bool TempFile::init(const std::string &Ext) {
 bool TempFile::writeBitcode(const Module &M) const {
   LLVM_DEBUG(dbgs() << " - write bitcode\n");
   std::error_code EC;
-  raw_fd_ostream OS(Filename, EC, sys::fs::F_None);
+  raw_fd_ostream OS(Filename, EC, sys::fs::OF_None);
   if (EC) {
     errs() << "verify-uselistorder: error: " << EC.message() << "\n";
     return true;
@@ -136,7 +136,7 @@ bool TempFile::writeBitcode(const Module &M) const {
 bool TempFile::writeAssembly(const Module &M) const {
   LLVM_DEBUG(dbgs() << " - write assembly\n");
   std::error_code EC;
-  raw_fd_ostream OS(Filename, EC, sys::fs::F_Text);
+  raw_fd_ostream OS(Filename, EC, sys::fs::OF_Text);
   if (EC) {
     errs() << "verify-uselistorder: error: " << EC.message() << "\n";
     return true;

+ 1 - 1
tools/yaml2obj/yaml2obj.cpp

@@ -77,7 +77,7 @@ int main(int argc, char **argv) {
 
   std::error_code EC;
   std::unique_ptr<ToolOutputFile> Out(
-      new ToolOutputFile(OutputFilename, EC, sys::fs::F_None));
+      new ToolOutputFile(OutputFilename, EC, sys::fs::OF_None));
   if (EC)
     error("yaml2obj: Error opening '" + OutputFilename + "': " + EC.message());
 

+ 1 - 1
unittests/BinaryFormat/TestFileMagic.cpp

@@ -123,7 +123,7 @@ TEST_F(MagicTest, Magic) {
     SmallString<128> file_pathname(TestDirectory);
     llvm::sys::path::append(file_pathname, i->filename);
     std::error_code EC;
-    raw_fd_ostream file(file_pathname, EC, sys::fs::F_None);
+    raw_fd_ostream file(file_pathname, EC, sys::fs::OF_None);
     ASSERT_FALSE(file.has_error());
     StringRef magic(i->magic_str, i->magic_str_len);
     file << magic;

+ 1 - 1
unittests/DebugInfo/DWARF/DwarfGenerator.cpp

@@ -531,7 +531,7 @@ bool dwarfgen::Generator::saveFile(StringRef Path) {
   if (FileBytes.empty())
     return false;
   std::error_code EC;
-  raw_fd_ostream Strm(Path, EC, sys::fs::F_None);
+  raw_fd_ostream Strm(Path, EC, sys::fs::OF_None);
   if (EC)
     return false;
   Strm.write(FileBytes.data(), FileBytes.size());

+ 1 - 1
unittests/ProfileData/SampleProfTest.cpp

@@ -44,7 +44,7 @@ struct SampleProfTest : ::testing::Test {
   void createWriter(SampleProfileFormat Format, StringRef Profile) {
     std::error_code EC;
     std::unique_ptr<raw_ostream> OS(
-        new raw_fd_ostream(Profile, EC, sys::fs::F_None));
+        new raw_fd_ostream(Profile, EC, sys::fs::OF_None));
     auto WriterOrErr = SampleProfileWriter::create(OS, Format);
     ASSERT_TRUE(NoError(WriterOrErr.getError()));
     Writer = std::move(WriterOrErr.get());

+ 3 - 3
unittests/Support/Path.cpp

@@ -1021,7 +1021,7 @@ TEST_F(FileSystemTest, CarriageReturn) {
   path::append(FilePathname, "test");
 
   {
-    raw_fd_ostream File(FilePathname, EC, sys::fs::F_Text);
+    raw_fd_ostream File(FilePathname, EC, sys::fs::OF_Text);
     ASSERT_NO_ERROR(EC);
     File << '\n';
   }
@@ -1032,7 +1032,7 @@ TEST_F(FileSystemTest, CarriageReturn) {
   }
 
   {
-    raw_fd_ostream File(FilePathname, EC, sys::fs::F_None);
+    raw_fd_ostream File(FilePathname, EC, sys::fs::OF_None);
     ASSERT_NO_ERROR(EC);
     File << '\n';
   }
@@ -1418,7 +1418,7 @@ TEST_F(FileSystemTest, AppendSetsCorrectFileOffset) {
                                      fs::CD_OpenExisting};
 
   // Write some data and re-open it with every possible disposition (this is a
-  // hack that shouldn't work, but is left for compatibility.  F_Append
+  // hack that shouldn't work, but is left for compatibility.  OF_Append
   // overrides
   // the specified disposition.
   for (fs::CreationDisposition Disp : Disps) {

+ 2 - 2
unittests/Support/raw_ostream_test.cpp

@@ -339,7 +339,7 @@ TEST(raw_ostreamTest, FormattedHexBytes) {
 TEST(raw_fd_ostreamTest, multiple_raw_fd_ostream_to_stdout) {
   std::error_code EC;
 
-  { raw_fd_ostream("-", EC, sys::fs::OpenFlags::F_None); }
-  { raw_fd_ostream("-", EC, sys::fs::OpenFlags::F_None); }
+  { raw_fd_ostream("-", EC, sys::fs::OpenFlags::OF_None); }
+  { raw_fd_ostream("-", EC, sys::fs::OpenFlags::OF_None); }
 }
 }