Make DiagnosticsEngine() take DiagOpts as DiagnosticsEngine.

No behavior change, but makes it a bit clearer that DiagnosticsEngine adds a
ref to DiagOpts.

llvm-svn: 322611
This commit is contained in:
Nico Weber 2018-01-17 02:55:27 +00:00
parent 620a7f765d
commit 8321ad9ffc
2 changed files with 6 additions and 6 deletions

View File

@ -402,7 +402,7 @@ private:
public:
explicit DiagnosticsEngine(IntrusiveRefCntPtr<DiagnosticIDs> Diags,
DiagnosticOptions *DiagOpts,
IntrusiveRefCntPtr<DiagnosticOptions> DiagOpts,
DiagnosticConsumer *client = nullptr,
bool ShouldOwnClient = true);
DiagnosticsEngine(const DiagnosticsEngine &) = delete;

View File

@ -57,11 +57,11 @@ static void DummyArgToStringFn(DiagnosticsEngine::ArgumentKind AK, intptr_t QT,
Output.append(Str.begin(), Str.end());
}
DiagnosticsEngine::DiagnosticsEngine(IntrusiveRefCntPtr<DiagnosticIDs> diags,
DiagnosticOptions *DiagOpts,
DiagnosticConsumer *client,
bool ShouldOwnClient)
: Diags(std::move(diags)), DiagOpts(DiagOpts), Client(nullptr),
DiagnosticsEngine::DiagnosticsEngine(
IntrusiveRefCntPtr<DiagnosticIDs> diags,
IntrusiveRefCntPtr<DiagnosticOptions> DiagOpts, DiagnosticConsumer *client,
bool ShouldOwnClient)
: Diags(std::move(diags)), DiagOpts(std::move(DiagOpts)), Client(nullptr),
SourceMgr(nullptr) {
setClient(client, ShouldOwnClient);
ArgToStringFn = DummyArgToStringFn;