r322611 - Make DiagnosticsEngine() take DiagOpts as DiagnosticsEngine.
Nico Weber via cfe-commits
cfe-commits at lists.llvm.org
Tue Jan 16 18:55:27 PST 2018
Author: nico
Date: Tue Jan 16 18:55:27 2018
New Revision: 322611
URL: http://llvm.org/viewvc/llvm-project?rev=322611&view=rev
Log:
Make DiagnosticsEngine() take DiagOpts as DiagnosticsEngine.
No behavior change, but makes it a bit clearer that DiagnosticsEngine adds a
ref to DiagOpts.
Modified:
cfe/trunk/include/clang/Basic/Diagnostic.h
cfe/trunk/lib/Basic/Diagnostic.cpp
Modified: cfe/trunk/include/clang/Basic/Diagnostic.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/Diagnostic.h?rev=322611&r1=322610&r2=322611&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/Diagnostic.h (original)
+++ cfe/trunk/include/clang/Basic/Diagnostic.h Tue Jan 16 18:55:27 2018
@@ -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;
Modified: cfe/trunk/lib/Basic/Diagnostic.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/Diagnostic.cpp?rev=322611&r1=322610&r2=322611&view=diff
==============================================================================
--- cfe/trunk/lib/Basic/Diagnostic.cpp (original)
+++ cfe/trunk/lib/Basic/Diagnostic.cpp Tue Jan 16 18:55:27 2018
@@ -57,11 +57,11 @@ static void DummyArgToStringFn(Diagnosti
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;
More information about the cfe-commits
mailing list