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 /clang/lib/CodeGen/CodeGenAction.cpp | |
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 'clang/lib/CodeGen/CodeGenAction.cpp')
-rw-r--r-- | clang/lib/CodeGen/CodeGenAction.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CodeGenAction.cpp b/clang/lib/CodeGen/CodeGenAction.cpp index 6961f011505..da8f372441f 100644 --- a/clang/lib/CodeGen/CodeGenAction.cpp +++ b/clang/lib/CodeGen/CodeGenAction.cpp @@ -195,7 +195,8 @@ namespace clang { return; } - Ctx.setDiagnosticsOutputFile(new yaml::Output(OptRecordFile->os())); + Ctx.setDiagnosticsOutputFile( + llvm::make_unique<yaml::Output>(OptRecordFile->os())); if (CodeGenOpts.getProfileUse() != CodeGenOptions::ProfileNone) Ctx.setDiagnosticHotnessRequested(true); |