aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Driver/Driver.cpp
diff options
context:
space:
mode:
authorAlex Brachet <abrachet@google.com>2022-05-31 17:10:16 +0000
committerAlex Brachet <abrachet@google.com>2022-05-31 17:10:16 +0000
commit7d76d6095880f34914d85d876b260cc4a4ea640d (patch)
tree13b57856f20b6cc91a3f89cdeb4457db8043a24e /clang/lib/Driver/Driver.cpp
parent80c4cf6369459f90e103339fcb9f6767474f478b (diff)
downloadllvm-7d76d6095880f34914d85d876b260cc4a4ea640d.zip
llvm-7d76d6095880f34914d85d876b260cc4a4ea640d.tar.gz
llvm-7d76d6095880f34914d85d876b260cc4a4ea640d.tar.bz2
[Clang] Extend -gen-reproducer flag
`-gen-reproducer` causes crash reproduction to be emitted even when clang didn't crash, and now can optionally take an argument of never, on-crash (default), on-error and always. Differential revision: https://reviews.llvm.org/D120201
Diffstat (limited to 'clang/lib/Driver/Driver.cpp')
-rw-r--r--clang/lib/Driver/Driver.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/clang/lib/Driver/Driver.cpp b/clang/lib/Driver/Driver.cpp
index 9492556..aaef2e1 100644
--- a/clang/lib/Driver/Driver.cpp
+++ b/clang/lib/Driver/Driver.cpp
@@ -198,8 +198,7 @@ Driver::Driver(StringRef ClangExecutable, StringRef TargetTriple,
CCPrintOptions(false), CCPrintHeaders(false), CCLogDiagnostics(false),
CCGenDiagnostics(false), CCPrintProcessStats(false),
TargetTriple(TargetTriple), Saver(Alloc), CheckInputsExist(true),
- ProbePrecompiled(true), GenReproducer(false),
- SuppressMissingInputWarning(false) {
+ ProbePrecompiled(true), SuppressMissingInputWarning(false) {
// Provide a sane fallback if no VFS is specified.
if (!this->VFS)
this->VFS = llvm::vfs::getRealFileSystem();
@@ -1217,9 +1216,6 @@ Compilation *Driver::BuildCompilation(ArrayRef<const char *> ArgList) {
CCCPrintBindings = Args.hasArg(options::OPT_ccc_print_bindings);
if (const Arg *A = Args.getLastArg(options::OPT_ccc_gcc_name))
CCCGenericGCCName = A->getValue();
- GenReproducer = Args.hasFlag(options::OPT_gen_reproducer,
- options::OPT_fno_crash_diagnostics,
- !!::getenv("FORCE_CLANG_DIAGNOSTICS_CRASH"));
// Process -fproc-stat-report options.
if (const Arg *A = Args.getLastArg(options::OPT_fproc_stat_report_EQ)) {