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/Frontend/ChainedIncludesSource.cpp | |
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/Frontend/ChainedIncludesSource.cpp')
-rw-r--r-- | clang/lib/Frontend/ChainedIncludesSource.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/Frontend/ChainedIncludesSource.cpp b/clang/lib/Frontend/ChainedIncludesSource.cpp index 205cb51cb0b..94bc2fff033 100644 --- a/clang/lib/Frontend/ChainedIncludesSource.cpp +++ b/clang/lib/Frontend/ChainedIncludesSource.cpp @@ -90,10 +90,10 @@ ChainedIncludesSource *ChainedIncludesSource::create(CompilerInstance &CI) { IK)); TextDiagnosticPrinter *DiagClient = - new TextDiagnosticPrinter(llvm::errs(), DiagnosticOptions()); + new TextDiagnosticPrinter(llvm::errs(), new DiagnosticOptions()); IntrusiveRefCntPtr<DiagnosticIDs> DiagID(new DiagnosticIDs()); IntrusiveRefCntPtr<DiagnosticsEngine> Diags( - new DiagnosticsEngine(DiagID, DiagClient)); + new DiagnosticsEngine(DiagID, &CI.getDiagnosticOpts(), DiagClient)); OwningPtr<CompilerInstance> Clang(new CompilerInstance()); Clang->setInvocation(CInvok.take()); |