From 75dbc717c21a662b7836ed34cc4e7da7b8fa33c0 Mon Sep 17 00:00:00 2001 From: Chad Rosier Date: Fri, 1 Feb 2013 18:30:26 +0000 Subject: [PATCH] [driver] Don't try to generate diagnostic information for dsymutil crashes. Part of rdar://13134273 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174203 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/clang/Driver/Tool.h | 1 + lib/Driver/Driver.cpp | 5 +++-- lib/Driver/Tools.h | 1 + 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/include/clang/Driver/Tool.h b/include/clang/Driver/Tool.h index c62e7567ea..4c05d0a743 100644 --- a/include/clang/Driver/Tool.h +++ b/include/clang/Driver/Tool.h @@ -50,6 +50,7 @@ public: virtual bool hasIntegratedAssembler() const { return false; } virtual bool hasIntegratedCPP() const = 0; virtual bool isLinkJob() const { return false; } + virtual bool isDsymutilJob() const { return false; } /// \brief Does this tool have "good" standardized diagnostics, or should the /// driver add an additional "command failed" diagnostic on failures. diff --git a/lib/Driver/Driver.cpp b/lib/Driver/Driver.cpp index 3ede6e3288..8a2804a9ad 100644 --- a/lib/Driver/Driver.cpp +++ b/lib/Driver/Driver.cpp @@ -339,8 +339,9 @@ void Driver::generateCompilationDiagnostics(Compilation &C, if (C.getArgs().hasArg(options::OPT_fno_crash_diagnostics)) return; - // Don't try to generate diagnostics for link jobs. - if (FailingCommand && FailingCommand->getCreator().isLinkJob()) + // Don't try to generate diagnostics for link or dsymutil jobs. + if (FailingCommand && (FailingCommand->getCreator().isLinkJob() || + FailingCommand->getCreator().isDsymutilJob())) return; // Print the version of the compiler. diff --git a/lib/Driver/Tools.h b/lib/Driver/Tools.h index a2b3c07b0c..f4aebd8bd2 100644 --- a/lib/Driver/Tools.h +++ b/lib/Driver/Tools.h @@ -278,6 +278,7 @@ namespace darwin { "dsymutil", TC) {} virtual bool hasIntegratedCPP() const { return false; } + virtual bool isDsymutilJob() const { return true; } virtual void ConstructJob(Compilation &C, const JobAction &JA, const InputInfo &Output, -- 2.40.0