[llvm] r224107 - Use make_unique instead of reset() and 'new'
Craig Topper
craig.topper at gmail.com
Thu Dec 11 23:52:14 PST 2014
Author: ctopper
Date: Fri Dec 12 01:52:14 2014
New Revision: 224107
URL: http://llvm.org/viewvc/llvm-project?rev=224107&view=rev
Log:
Use make_unique instead of reset() and 'new'
Modified:
llvm/trunk/tools/opt/opt.cpp
Modified: llvm/trunk/tools/opt/opt.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/opt/opt.cpp?rev=224107&r1=224106&r2=224107&view=diff
==============================================================================
--- llvm/trunk/tools/opt/opt.cpp (original)
+++ llvm/trunk/tools/opt/opt.cpp Fri Dec 12 01:52:14 2014
@@ -445,7 +445,8 @@ int main(int argc, char **argv) {
OutputFilename = "-";
std::error_code EC;
- Out.reset(new tool_output_file(OutputFilename, EC, sys::fs::F_None));
+ Out = llvm::make_unique<tool_output_file>(OutputFilename, EC,
+ sys::fs::F_None);
if (EC) {
errs() << EC.message() << '\n';
return 1;
More information about the llvm-commits
mailing list