Skip to content
Snippets Groups Projects
Commit b806c5ad authored by Mehdi Amini's avatar Mehdi Amini
Browse files

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@287449 91177308-0d34-0410-b5e6-96231b3b80d8
parent 8a6ea813
No related branches found
No related tags found
No related merge requests found
...@@ -195,7 +195,8 @@ namespace clang { ...@@ -195,7 +195,8 @@ namespace clang {
return; return;
} }
Ctx.setDiagnosticsOutputFile(new yaml::Output(OptRecordFile->os())); Ctx.setDiagnosticsOutputFile(
llvm::make_unique<yaml::Output>(OptRecordFile->os()));
if (CodeGenOpts.getProfileUse() != CodeGenOptions::ProfileNone) if (CodeGenOpts.getProfileUse() != CodeGenOptions::ProfileNone)
Ctx.setDiagnosticHotnessRequested(true); Ctx.setDiagnosticHotnessRequested(true);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment