diff options
Diffstat (limited to 'contrib/llvm-project/llvm/tools/opt/opt.cpp')
| -rw-r--r-- | contrib/llvm-project/llvm/tools/opt/opt.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/contrib/llvm-project/llvm/tools/opt/opt.cpp b/contrib/llvm-project/llvm/tools/opt/opt.cpp index 2ee028e774f4..15495a511d06 100644 --- a/contrib/llvm-project/llvm/tools/opt/opt.cpp +++ b/contrib/llvm-project/llvm/tools/opt/opt.cpp @@ -611,7 +611,9 @@ int main(int argc, char **argv) { OutputFilename = "-"; std::error_code EC; - Out.reset(new ToolOutputFile(OutputFilename, EC, sys::fs::F_None)); + sys::fs::OpenFlags Flags = OutputAssembly ? sys::fs::OF_Text + : sys::fs::OF_None; + Out.reset(new ToolOutputFile(OutputFilename, EC, Flags)); if (EC) { errs() << EC.message() << '\n'; return 1; @@ -619,7 +621,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; @@ -719,8 +721,8 @@ int main(int argc, char **argv) { OutputFilename = "-"; std::error_code EC; - Out = llvm::make_unique<ToolOutputFile>(OutputFilename, EC, - sys::fs::F_None); + Out = std::make_unique<ToolOutputFile>(OutputFilename, EC, + sys::fs::OF_None); if (EC) { errs() << EC.message() << '\n'; return 1; @@ -866,7 +868,7 @@ int main(int argc, char **argv) { assert(Out); OS = &Out->os(); if (RunTwice) { - BOS = make_unique<raw_svector_ostream>(Buffer); + BOS = std::make_unique<raw_svector_ostream>(Buffer); OS = BOS.get(); } if (OutputAssembly) { |
