aboutsummaryrefslogtreecommitdiff
path: root/include/clang/Frontend/CompilerInstance.h
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-11-13 05:52:34 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-11-13 05:52:34 +0000
commit0fbb3d9a9cdd2201848be9eb017c54cd78538122 (patch)
tree3cbd8bcb9b598699416f672ad8f32f69a2b2f1a3 /include/clang/Frontend/CompilerInstance.h
parentf819b25bbfb8bcf65239de259a3174b900612f23 (diff)
Add CompilerInstance::createDiagnostics, and move clang-cc to it.
clang-cc.cpp is now under 1k lines, if anyone is counting. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@87090 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Frontend/CompilerInstance.h')
-rw-r--r--include/clang/Frontend/CompilerInstance.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/include/clang/Frontend/CompilerInstance.h b/include/clang/Frontend/CompilerInstance.h
index dad99e39f6..b288236768 100644
--- a/include/clang/Frontend/CompilerInstance.h
+++ b/include/clang/Frontend/CompilerInstance.h
@@ -268,6 +268,22 @@ public:
/// @name Construction Utility Methods
/// {
+ /// Create the diagnostics engine using the invocation's diagnostic options
+ /// and replace any existing one with it.
+ ///
+ /// Note that this routine also replaces the diagnostic client.
+ void createDiagnostics(int Argc, char **Argv);
+
+ /// Create a Diagnostic object with a the TextDiagnosticPrinter.
+ ///
+ /// The \arg Argc and \arg Argv arguments are used only for logging purposes,
+ /// when the diagnostic options indicate that the compiler should output
+ /// logging information.
+ ///
+ /// \return The new object on success, or null on failure.
+ static Diagnostic *createDiagnostics(const DiagnosticOptions &Opts,
+ int Argc, char **Argv);
+
/// Create the file manager and replace any existing one with it.
void createFileManager();