diff options
author | Douglas Gregor <dgregor@apple.com> | 2012-10-23 22:26:28 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2012-10-23 22:26:28 +0000 |
commit | 811db4eac4e036de3705570a46e28bf7d993dbab (patch) | |
tree | a3c03c187e25f995d854d175faaa3d793f12bee1 /clang/lib/Basic | |
parent | 7fcf0c131bc198de245e65f35b380af02b085dde (diff) | |
download | bcm5719-llvm-811db4eac4e036de3705570a46e28bf7d993dbab.tar.gz bcm5719-llvm-811db4eac4e036de3705570a46e28bf7d993dbab.zip |
Make DiagnosticOptions intrusively reference-counted, and make sure
the various stakeholders bump up the reference count. In particular,
the diagnostics engine now keeps the DiagnosticOptions object alive.
llvm-svn: 166508
Diffstat (limited to 'clang/lib/Basic')
-rw-r--r-- | clang/lib/Basic/Diagnostic.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/clang/lib/Basic/Diagnostic.cpp b/clang/lib/Basic/Diagnostic.cpp index 893eed041f5..854c4c56bb7 100644 --- a/clang/lib/Basic/Diagnostic.cpp +++ b/clang/lib/Basic/Diagnostic.cpp @@ -12,6 +12,7 @@ //===----------------------------------------------------------------------===// #include "clang/Basic/Diagnostic.h" +#include "clang/Basic/DiagnosticOptions.h" #include "clang/Basic/IdentifierTable.h" #include "clang/Basic/PartialDiagnostic.h" #include "llvm/ADT/SmallString.h" @@ -37,9 +38,10 @@ static void DummyArgToStringFn(DiagnosticsEngine::ArgumentKind AK, intptr_t QT, DiagnosticsEngine::DiagnosticsEngine( const IntrusiveRefCntPtr<DiagnosticIDs> &diags, + DiagnosticOptions *DiagOpts, DiagnosticConsumer *client, bool ShouldOwnClient) - : Diags(diags), Client(client), OwnsDiagClient(ShouldOwnClient), - SourceMgr(0) { + : Diags(diags), DiagOpts(DiagOpts), Client(client), + OwnsDiagClient(ShouldOwnClient), SourceMgr(0) { ArgToStringFn = DummyArgToStringFn; ArgToStringCookie = 0; |