diff options
author | Mehdi Amini <mehdi.amini@apple.com> | 2016-11-19 18:19:41 +0000 |
---|---|---|
committer | Mehdi Amini <mehdi.amini@apple.com> | 2016-11-19 18:19:41 +0000 |
commit | 6f408368237fdb0beb2ac1bf1d1bb7ad6124b99b (patch) | |
tree | 0aa9454cea4d74b286f93ec63289d8a81f505448 /llvm/tools | |
parent | 0a94bffe1204200b0494a7b74be5a28733cfa628 (diff) | |
download | bcm5719-llvm-6f408368237fdb0beb2ac1bf1d1bb7ad6124b99b.tar.gz bcm5719-llvm-6f408368237fdb0beb2ac1bf1d1bb7ad6124b99b.zip |
Change setDiagnosticsOutputFile to take a unique_ptr from a raw pointer (NFC)
Summary:
This makes it explicit that ownership is taken. Also replace all `new`
with make_unique<> at call sites.
Reviewers: anemet
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D26884
llvm-svn: 287449
Diffstat (limited to 'llvm/tools')
-rw-r--r-- | llvm/tools/opt/opt.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/tools/opt/opt.cpp b/llvm/tools/opt/opt.cpp index 0a42c13898a..035629a8aa4 100644 --- a/llvm/tools/opt/opt.cpp +++ b/llvm/tools/opt/opt.cpp @@ -424,7 +424,8 @@ int main(int argc, char **argv) { errs() << EC.message() << '\n'; return 1; } - Context.setDiagnosticsOutputFile(new yaml::Output(YamlFile->os())); + Context.setDiagnosticsOutputFile( + llvm::make_unique<yaml::Output>(YamlFile->os())); } // Load the input module... |