From 518d955f9dd2f5f854006a71ff9c8b117a66548b Mon Sep 17 00:00:00 2001 From: "Duncan P. N. Exon Smith" Date: Wed, 28 Apr 2021 18:18:35 -0700 Subject: [PATCH] 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 --- clang/lib/Tooling/DumpTool/ASTSrcLocProcessor.cpp | 2 +- clang/lib/Tooling/DumpTool/ClangSrcLocDump.cpp | 2 +- libclc/utils/prepare-builtins.cpp | 4 ++-- lld/ELF/Driver.cpp | 2 +- llvm/lib/Analysis/CFGPrinter.cpp | 2 +- llvm/lib/Analysis/CallPrinter.cpp | 2 +- llvm/lib/Analysis/DDGPrinter.cpp | 2 +- llvm/tools/llvm-ml/llvm-ml.cpp | 2 +- mlir/lib/Support/FileUtilities.cpp | 2 +- 9 files changed, 10 insertions(+), 10 deletions(-) diff --git a/clang/lib/Tooling/DumpTool/ASTSrcLocProcessor.cpp b/clang/lib/Tooling/DumpTool/ASTSrcLocProcessor.cpp index 0a7fb9b..2f97067 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 436d388..8091a46 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 de1e804..550b597 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 Out( - new ToolOutputFile(OutputFilename, EC, sys::fs::F_None)); + new ToolOutputFile(OutputFilename, EC, sys::fs::OF_None)); #else std::unique_ptr 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 24cf5d1..104742b 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 3373dfa..b981925 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 bbbcbf8..829532a 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 51bd548..0d5a936 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 1292f40..1a63017 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 GetOutputStream(StringRef Path) { std::error_code EC; - auto Out = std::make_unique(Path, EC, sys::fs::F_None); + auto Out = std::make_unique(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 652ec63..a20ad48 100644 --- a/mlir/lib/Support/FileUtilities.cpp +++ b/mlir/lib/Support/FileUtilities.cpp @@ -35,7 +35,7 @@ std::unique_ptr mlir::openOutputFile(StringRef outputFilename, std::string *errorMessage) { std::error_code error; auto result = std::make_unique(outputFilename, error, - llvm::sys::fs::F_None); + llvm::sys::fs::OF_None); if (error) { if (errorMessage) *errorMessage = "cannot open output file '" + outputFilename.str() + -- 2.7.4