[lld] 518d955 - Support: Stop using F_{None,Text,Append} compatibility synonyms, NFC

Duncan P. N. Exon Smith via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 30 11:00:48 PDT 2021


Author: Duncan P. N. Exon Smith
Date: 2021-04-30T11:00:03-07:00
New Revision: 518d955f9dd2f5f854006a71ff9c8b117a66548b

URL: https://github.com/llvm/llvm-project/commit/518d955f9dd2f5f854006a71ff9c8b117a66548b
DIFF: https://github.com/llvm/llvm-project/commit/518d955f9dd2f5f854006a71ff9c8b117a66548b.diff

LOG: Support: Stop using F_{None,Text,Append} compatibility synonyms, NFC

Stop using the compatibility spellings of `OF_{None,Text,Append}`
left behind by 1f67a3cba9b09636c56e2109d8a35ae96dc15782. A follow-up
will remove them.

Differential Revision: https://reviews.llvm.org/D101650

Added: 
    

Modified: 
    clang/lib/Tooling/DumpTool/ASTSrcLocProcessor.cpp
    clang/lib/Tooling/DumpTool/ClangSrcLocDump.cpp
    libclc/utils/prepare-builtins.cpp
    lld/ELF/Driver.cpp
    llvm/lib/Analysis/CFGPrinter.cpp
    llvm/lib/Analysis/CallPrinter.cpp
    llvm/lib/Analysis/DDGPrinter.cpp
    llvm/tools/llvm-ml/llvm-ml.cpp
    mlir/lib/Support/FileUtilities.cpp

Removed: 
    


################################################################################
diff  --git a/clang/lib/Tooling/DumpTool/ASTSrcLocProcessor.cpp b/clang/lib/Tooling/DumpTool/ASTSrcLocProcessor.cpp
index 0a7fb9b52f230..2f97067f61716 100644
--- a/clang/lib/Tooling/DumpTool/ASTSrcLocProcessor.cpp
+++ b/clang/lib/Tooling/DumpTool/ASTSrcLocProcessor.cpp
@@ -122,7 +122,7 @@ void WriteJSON(StringRef JsonPath, llvm::json::Object &&ClassInheritance,
   }
 
   std::error_code EC;
-  llvm::raw_fd_ostream JsonOut(JsonPath, EC, llvm::sys::fs::F_Text);
+  llvm::raw_fd_ostream JsonOut(JsonPath, EC, llvm::sys::fs::OF_Text);
   if (EC)
     return;
 

diff  --git a/clang/lib/Tooling/DumpTool/ClangSrcLocDump.cpp b/clang/lib/Tooling/DumpTool/ClangSrcLocDump.cpp
index 436d388a99f41..8091a467d056c 100644
--- a/clang/lib/Tooling/DumpTool/ClangSrcLocDump.cpp
+++ b/clang/lib/Tooling/DumpTool/ClangSrcLocDump.cpp
@@ -71,7 +71,7 @@ int main(int argc, const char **argv) {
 
   if (SkipProcessing) {
     std::error_code EC;
-    llvm::raw_fd_ostream JsonOut(JsonOutputPath, EC, llvm::sys::fs::F_Text);
+    llvm::raw_fd_ostream JsonOut(JsonOutputPath, EC, llvm::sys::fs::OF_Text);
     if (EC)
       return 1;
     JsonOut << formatv("{0:2}", llvm::json::Value(llvm::json::Object()));

diff  --git a/libclc/utils/prepare-builtins.cpp b/libclc/utils/prepare-builtins.cpp
index de1e804d6fcf9..550b5971913f4 100644
--- a/libclc/utils/prepare-builtins.cpp
+++ b/libclc/utils/prepare-builtins.cpp
@@ -95,10 +95,10 @@ int main(int argc, char **argv) {
   std::error_code EC;
 #if HAVE_LLVM >= 0x0600
   std::unique_ptr<ToolOutputFile> Out(
-      new ToolOutputFile(OutputFilename, EC, sys::fs::F_None));
+      new ToolOutputFile(OutputFilename, EC, sys::fs::OF_None));
 #else
   std::unique_ptr<tool_output_file> Out(
-      new tool_output_file(OutputFilename, EC, sys::fs::F_None));
+      new tool_output_file(OutputFilename, EC, sys::fs::OF_None));
 #endif
   if (EC) {
     errs() << EC.message() << '\n';

diff  --git a/lld/ELF/Driver.cpp b/lld/ELF/Driver.cpp
index 24cf5d15a7d55..104742b9d0ec3 100644
--- a/lld/ELF/Driver.cpp
+++ b/lld/ELF/Driver.cpp
@@ -1690,7 +1690,7 @@ static void handleLibcall(StringRef name) {
 // easily.
 static void writeDependencyFile() {
   std::error_code ec;
-  raw_fd_ostream os(config->dependencyFile, ec, sys::fs::F_None);
+  raw_fd_ostream os(config->dependencyFile, ec, sys::fs::OF_None);
   if (ec) {
     error("cannot open " + config->dependencyFile + ": " + ec.message());
     return;

diff  --git a/llvm/lib/Analysis/CFGPrinter.cpp b/llvm/lib/Analysis/CFGPrinter.cpp
index 3373dfab011ac..b981925542c6c 100644
--- a/llvm/lib/Analysis/CFGPrinter.cpp
+++ b/llvm/lib/Analysis/CFGPrinter.cpp
@@ -63,7 +63,7 @@ static void writeCFGToDotFile(Function &F, BlockFrequencyInfo *BFI,
   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);
 
   DOTFuncInfo CFGInfo(&F, BFI, BPI, MaxFreq);
   CFGInfo.setHeatColors(ShowHeatColors);

diff  --git a/llvm/lib/Analysis/CallPrinter.cpp b/llvm/lib/Analysis/CallPrinter.cpp
index bbbcbf8dd1cc3..829532a0fa104 100644
--- a/llvm/lib/Analysis/CallPrinter.cpp
+++ b/llvm/lib/Analysis/CallPrinter.cpp
@@ -274,7 +274,7 @@ bool CallGraphDOTPrinter::runOnModule(Module &M) {
   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);
 
   CallGraph CG(M);
   CallGraphDOTInfo CFGInfo(&M, &CG, LookupBFI);

diff  --git a/llvm/lib/Analysis/DDGPrinter.cpp b/llvm/lib/Analysis/DDGPrinter.cpp
index 51bd54809857d..0d5a936723ce3 100644
--- a/llvm/lib/Analysis/DDGPrinter.cpp
+++ b/llvm/lib/Analysis/DDGPrinter.cpp
@@ -42,7 +42,7 @@ static void writeDDGToDotFile(DataDependenceGraph &G, bool DOnly) {
   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)
     // We only provide the constant verson of the DOTGraphTrait specialization,

diff  --git a/llvm/tools/llvm-ml/llvm-ml.cpp b/llvm/tools/llvm-ml/llvm-ml.cpp
index 1292f40eaa32d..1a63017a5111f 100644
--- a/llvm/tools/llvm-ml/llvm-ml.cpp
+++ b/llvm/tools/llvm-ml/llvm-ml.cpp
@@ -96,7 +96,7 @@ static Triple GetTriple(StringRef ProgName, opt::InputArgList &Args) {
 
 static std::unique_ptr<ToolOutputFile> GetOutputStream(StringRef Path) {
   std::error_code EC;
-  auto Out = std::make_unique<ToolOutputFile>(Path, EC, sys::fs::F_None);
+  auto Out = std::make_unique<ToolOutputFile>(Path, EC, sys::fs::OF_None);
   if (EC) {
     WithColor::error() << EC.message() << '\n';
     return nullptr;

diff  --git a/mlir/lib/Support/FileUtilities.cpp b/mlir/lib/Support/FileUtilities.cpp
index 652ec63f1d73c..a20ad485064c8 100644
--- a/mlir/lib/Support/FileUtilities.cpp
+++ b/mlir/lib/Support/FileUtilities.cpp
@@ -35,7 +35,7 @@ std::unique_ptr<llvm::ToolOutputFile>
 mlir::openOutputFile(StringRef outputFilename, std::string *errorMessage) {
   std::error_code error;
   auto result = std::make_unique<llvm::ToolOutputFile>(outputFilename, error,
-                                                       llvm::sys::fs::F_None);
+                                                       llvm::sys::fs::OF_None);
   if (error) {
     if (errorMessage)
       *errorMessage = "cannot open output file '" + outputFilename.str() +


        


More information about the llvm-commits mailing list