Use make_unique instead of reset() and 'new'
authorCraig Topper <craig.topper@gmail.com>
Fri, 12 Dec 2014 07:52:14 +0000 (07:52 +0000)
committerCraig Topper <craig.topper@gmail.com>
Fri, 12 Dec 2014 07:52:14 +0000 (07:52 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224107 91177308-0d34-0410-b5e6-96231b3b80d8

tools/opt/opt.cpp

index 7e7f10db276629b8abc01aada1d5f5352fa7d54e..9867589080614a3d43ff63dae6e9da8416261c79 100644 (file)
@@ -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;