aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChad Rosier <mcrosier@apple.com>2012-02-22 00:30:39 +0000
committerChad Rosier <mcrosier@apple.com>2012-02-22 00:30:39 +0000
commit2639ac628cff5dedb4fa60169082b2a1a9dd8694 (patch)
tree8968c2be81b55e6663370aaa1676911de6d4eacb
parent57317788289549d61ada868d07792b637a32d52e (diff)
Provide a way to disable auto-generation of preprocessed files during clang
crash. This can speedup the process of generating a delta reduced test case. rdar://10905465 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151109 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/clang/Driver/Options.td1
-rw-r--r--lib/Driver/Driver.cpp3
2 files changed, 4 insertions, 0 deletions
diff --git a/include/clang/Driver/Options.td b/include/clang/Driver/Options.td
index e3bff60e8c..e9c679e179 100644
--- a/include/clang/Driver/Options.td
+++ b/include/clang/Driver/Options.td
@@ -292,6 +292,7 @@ def fconstant_string_class_EQ : Joined<"-fconstant-string-class=">, Group<f_Grou
def fconstexpr_depth_EQ : Joined<"-fconstexpr-depth=">, Group<f_Group>;
def fconstexpr_backtrace_limit_EQ : Joined<"-fconstexpr-backtrace-limit=">,
Group<f_Group>;
+def fno_crash_diagnostics : Flag<"-fno-crash-diagnostics">, Group<f_clang_Group>, Flags<[NoArgumentUnused]>;
def fcreate_profile : Flag<"-fcreate-profile">, Group<f_Group>;
def fcxx_exceptions: Flag<"-fcxx-exceptions">, Group<f_Group>;
def fcxx_modules : Flag <"-fcxx-modules">, Group<f_Group>, Flags<[NoForward]>;
diff --git a/lib/Driver/Driver.cpp b/lib/Driver/Driver.cpp
index da1a40d1e6..f9e5d82c02 100644
--- a/lib/Driver/Driver.cpp
+++ b/lib/Driver/Driver.cpp
@@ -363,6 +363,9 @@ Compilation *Driver::BuildCompilation(ArrayRef<const char *> ArgList) {
// diagnostic information to a bug report.
void Driver::generateCompilationDiagnostics(Compilation &C,
const Command *FailingCommand) {
+ if (C.getArgs().hasArg(options::OPT_fno_crash_diagnostics))
+ return;
+
Diag(clang::diag::note_drv_command_failed_diag_msg)
<< "Please submit a bug report to " BUG_REPORT_URL " and include command"
" line arguments and all diagnostic information.";