r244179 - Driver: Strip -header-include-file and -diagnostic-log-file from crash repro scripts
Justin Bogner
mail at justinbogner.com
Wed Aug 5 16:49:44 PDT 2015
Author: bogner
Date: Wed Aug 5 18:49:44 2015
New Revision: 244179
URL: http://llvm.org/viewvc/llvm-project?rev=244179&view=rev
Log:
Driver: Strip -header-include-file and -diagnostic-log-file from crash repro scripts
These two arguments tend to refer to a local path that won't exist
when we try to reproduce a bug. Strip them.
Modified:
cfe/trunk/lib/Driver/Job.cpp
cfe/trunk/test/Driver/crash-report.c
Modified: cfe/trunk/lib/Driver/Job.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Job.cpp?rev=244179&r1=244178&r2=244179&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/Job.cpp (original)
+++ cfe/trunk/lib/Driver/Job.cpp Wed Aug 5 18:49:44 2015
@@ -48,6 +48,7 @@ static int skipArgs(const char *Flag, bo
.Cases("-iwithprefixbefore", "-isystem", "-iquote", true)
.Cases("-resource-dir", "-serialize-diagnostic-file", true)
.Cases("-dwarf-debug-flags", "-ivfsoverlay", true)
+ .Cases("-header-include-file", "-diagnostic-log-file", true)
// Some include flags shouldn't be skipped if we have a crash VFS
.Case("-isysroot", !HaveCrashVFS)
.Default(false);
Modified: cfe/trunk/test/Driver/crash-report.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/crash-report.c?rev=244179&r1=244178&r2=244179&view=diff
==============================================================================
--- cfe/trunk/test/Driver/crash-report.c (original)
+++ cfe/trunk/test/Driver/crash-report.c Wed Aug 5 18:49:44 2015
@@ -1,7 +1,9 @@
// RUN: rm -rf %t
// RUN: mkdir %t
-// RUN: not env TMPDIR=%t TEMP=%t TMP=%t RC_DEBUG_OPTIONS=1 %clang -fsyntax-only %s \
-// RUN: -F/tmp/ -I /tmp/ -idirafter /tmp/ -iquote /tmp/ -isystem /tmp/ \
+// RUN: not env TMPDIR=%t TEMP=%t TMP=%t RC_DEBUG_OPTIONS=1 \
+// RUN: CC_PRINT_HEADERS=1 CC_LOG_DIAGNOSTICS=1 \
+// RUN: %clang -fsyntax-only %s \
+// RUN: -F/tmp/ -I /tmp/ -idirafter /tmp/ -iquote /tmp/ -isystem /tmp/ \
// RUN: -iprefix /the/prefix -iwithprefix /tmp -iwithprefixbefore /tmp/ \
// RUN: -Xclang -internal-isystem -Xclang /tmp/ \
// RUN: -Xclang -internal-externc-isystem -Xclang /tmp/ \
@@ -26,6 +28,8 @@ FOO
// CHECKSH-NEXT: # Original command: {{.*$}}
// CHECKSH-NEXT: "-cc1"
// CHECKSH: "-main-file-name" "crash-report.c"
+// CHECKSH-NOT: "-header-include-file"
+// CHECKSH-NOT: "-diagnostic-log-file"
// CHECKSH: "-D" "FOO=BAR"
// CHECKSH: "-D" "BAR=BAZ QUX"
// CHECKSH-NOT: "-F/tmp/"
More information about the cfe-commits
mailing list