aboutsummaryrefslogtreecommitdiff
path: root/include/clang/Frontend/CompilerInstance.h
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2011-09-13 01:26:44 +0000
committerDouglas Gregor <dgregor@apple.com>2011-09-13 01:26:44 +0000
commit78243658c533168d51fd076fba328437932ba6f1 (patch)
tree5ac50b68c9aacb2e986d1a4afecfcdbab1d1f931 /include/clang/Frontend/CompilerInstance.h
parent21cae2059a06f7d89eee169409c9266def1b1aca (diff)
When compiling a module on-demand, re-use the diagnostics client
already provided. This required a little bit of clean-up in the way that VerifyDiagnosticsClient managed ownership of its underlying "primary" client, because now it will no longer always take ownership. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139570 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Frontend/CompilerInstance.h')
-rw-r--r--include/clang/Frontend/CompilerInstance.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/include/clang/Frontend/CompilerInstance.h b/include/clang/Frontend/CompilerInstance.h
index 88f8976b67..c61d6df196 100644
--- a/include/clang/Frontend/CompilerInstance.h
+++ b/include/clang/Frontend/CompilerInstance.h
@@ -457,8 +457,12 @@ public:
/// \param Client If non-NULL, a diagnostic client that will be
/// attached to (and, then, owned by) the Diagnostic inside this AST
/// unit.
+ ///
+ /// \param ShouldOwnClient If Client is non-NULL, specifies whether
+ /// the diagnostic object should take ownership of the client.
void createDiagnostics(int Argc, const char* const *Argv,
- DiagnosticClient *Client = 0);
+ DiagnosticClient *Client = 0,
+ bool ShouldOwnClient = true);
/// Create a Diagnostic object with a the TextDiagnosticPrinter.
///
@@ -487,6 +491,7 @@ public:
createDiagnostics(const DiagnosticOptions &Opts, int Argc,
const char* const *Argv,
DiagnosticClient *Client = 0,
+ bool ShouldOwnClient = true,
const CodeGenOptions *CodeGenOpts = 0);
/// Create the file manager and replace any existing one with it.