Skip to content

Commit

Permalink
Replace llvm::sys::fs::F_None with llvm::sys::fs::OF_None
Browse files Browse the repository at this point in the history
The former is deprecated.
OF_None has been available in LLVM since 2018-06.
  • Loading branch information
MaskRay committed Apr 29, 2021
1 parent 18587b1 commit 0142d1c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp
Expand Up @@ -609,7 +609,7 @@ LLVMRustWriteOutputFile(LLVMTargetMachineRef Target, LLVMPassManagerRef PMR,

std::string ErrorInfo;
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)
ErrorInfo = EC.message();
if (ErrorInfo != "") {
Expand All @@ -619,7 +619,7 @@ LLVMRustWriteOutputFile(LLVMTargetMachineRef Target, LLVMPassManagerRef PMR,

buffer_ostream BOS(OS);
if (DwoPath) {
raw_fd_ostream DOS(DwoPath, EC, sys::fs::F_None);
raw_fd_ostream DOS(DwoPath, EC, sys::fs::OF_None);
EC.clear();
if (EC)
ErrorInfo = EC.message();
Expand Down Expand Up @@ -1146,7 +1146,7 @@ extern "C" LLVMRustResult
LLVMRustPrintModule(LLVMModuleRef M, const char *Path, DemangleFn Demangle) {
std::string ErrorInfo;
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)
ErrorInfo = EC.message();
if (ErrorInfo != "") {
Expand Down

0 comments on commit 0142d1c

Please sign in to comment.