diff options
author | Daniel Dunbar <daniel@zuster.org> | 2011-04-07 18:01:20 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2011-04-07 18:01:20 +0000 |
commit | c8a22b091677c02003880166e5d5767ca8d74b70 (patch) | |
tree | 476b225cea5e9c58254f5269422efd007aa5b8e4 /include/clang | |
parent | 14c65ca4cd914f3090d7eedb9bff4deb0ffc7927 (diff) |
Driver: Sketch driver support for a CC_LOG_DIAGNOSTICS options, similar to the
existing CC_PRINT_OPTIONS and CC_PRINT_HEADERS, which can be used to
transparently capture the compiler diagnostics from a build.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129082 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang')
-rw-r--r-- | include/clang/Basic/DiagnosticFrontendKinds.td | 2 | ||||
-rw-r--r-- | include/clang/Driver/Driver.h | 8 |
2 files changed, 10 insertions, 0 deletions
diff --git a/include/clang/Basic/DiagnosticFrontendKinds.td b/include/clang/Basic/DiagnosticFrontendKinds.td index 30706769d4..6ad9529c5f 100644 --- a/include/clang/Basic/DiagnosticFrontendKinds.td +++ b/include/clang/Basic/DiagnosticFrontendKinds.td @@ -79,6 +79,8 @@ def warn_fe_macro_contains_embedded_newline : Warning< "macro '%0' contains embedded newline, text after the newline is ignored.">; def warn_fe_cc_print_header_failure : Warning< "unable to open CC_PRINT_HEADERS file: %0 (using stderr)">; +def warn_fe_cc_log_diagnositcs_failure : Warning< + "unable to open CC_LOG_DIAGNOSTICS file: %0 (using stderr)">; def err_verify_missing_start : Error< "cannot find start ('{{') of expected %0">; diff --git a/include/clang/Driver/Driver.h b/include/clang/Driver/Driver.h index 92497ea28d..56afa02b30 100644 --- a/include/clang/Driver/Driver.h +++ b/include/clang/Driver/Driver.h @@ -106,6 +106,9 @@ public: /// The file to log CC_PRINT_HEADERS output to, if enabled. const char *CCPrintHeadersFilename; + /// The file to log CC_LOG_DIAGNOSTICS output to, if enabled. + const char *CCLogDiagnosticsFilename; + /// Whether the driver should follow g++ like behavior. unsigned CCCIsCXX : 1; @@ -126,6 +129,11 @@ public: /// information to CCPrintHeadersFilename or to stderr. unsigned CCPrintHeaders : 1; + /// Set CC_LOG_DIAGNOSTICS mode, which causes the frontend to log diagnostics + /// to CCLogDiagnosticsFilename or to stderr, in a stable machine readable + /// format. + unsigned CCLogDiagnostics : 1; + private: /// Name to use when calling the generic gcc. std::string CCCGenericGCCName; |