diff options
author | Douglas Gregor <dgregor@apple.com> | 2011-09-29 00:38:00 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2011-09-29 00:38:00 +0000 |
commit | aee526e77657afd1600276450e9c346953ad51d7 (patch) | |
tree | c21f821b09625211f00cbb5018546edb013a23b6 /include/clang/Frontend/CompilerInstance.h | |
parent | 4213df3b5da21ce25a4541ca5c447eeb28b515a3 (diff) |
Introduce a pure virtual clone() method to DiagnosticConsumer, so that
we have the ability to create a new, distict diagnostic consumer when
we go off and build a module. This avoids the currently horribleness
where the same diagnostic consumer sees diagnostics for multiple
translation units (and multiple SourceManagers!) causing all sorts of havok.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140743 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Frontend/CompilerInstance.h')
-rw-r--r-- | include/clang/Frontend/CompilerInstance.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/include/clang/Frontend/CompilerInstance.h b/include/clang/Frontend/CompilerInstance.h index d44f507d02..881774022d 100644 --- a/include/clang/Frontend/CompilerInstance.h +++ b/include/clang/Frontend/CompilerInstance.h @@ -460,9 +460,13 @@ public: /// /// \param ShouldOwnClient If Client is non-NULL, specifies whether /// the diagnostic object should take ownership of the client. + /// + /// \param ShouldCloneClient If Client is non-NULL, specifies whether that + /// client should be cloned. void createDiagnostics(int Argc, const char* const *Argv, DiagnosticConsumer *Client = 0, - bool ShouldOwnClient = true); + bool ShouldOwnClient = true, + bool ShouldCloneClient = true); /// Create a DiagnosticsEngine object with a the TextDiagnosticPrinter. /// @@ -492,6 +496,7 @@ public: const char* const *Argv, DiagnosticConsumer *Client = 0, bool ShouldOwnClient = true, + bool ShouldCloneClient = true, const CodeGenOptions *CodeGenOpts = 0); /// Create the file manager and replace any existing one with it. |