]> granicus.if.org Git - clang/commitdiff
Driver: Strip -header-include-file and -diagnostic-log-file from crash repro scripts
authorJustin Bogner <mail@justinbogner.com>
Wed, 5 Aug 2015 23:49:44 +0000 (23:49 +0000)
committerJustin Bogner <mail@justinbogner.com>
Wed, 5 Aug 2015 23:49:44 +0000 (23:49 +0000)
These two arguments tend to refer to a local path that won't exist
when we try to reproduce a bug. Strip them.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@244179 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Driver/Job.cpp
test/Driver/crash-report.c

index cd382b3356fe47bd584ded8e79bacdc2cea2cbbb..22904e5398a0b60c9b1831ecc829ea85325b2367 100644 (file)
@@ -48,6 +48,7 @@ static int skipArgs(const char *Flag, bool HaveCrashVFS) {
     .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);
index 38813e3bb8afe252fa2d3414d17ddd12eb0d64eb..a3f1f9e72a571a3418b4720b7d39277dbe0014db 100644 (file)
@@ -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/"