]> granicus.if.org Git - clang/commitdiff
Driver: Skip the -fmodules-cache-path argument in driver crash diags
authorJustin Bogner <mail@justinbogner.com>
Tue, 22 Apr 2014 21:30:17 +0000 (21:30 +0000)
committerJustin Bogner <mail@justinbogner.com>
Tue, 22 Apr 2014 21:30:17 +0000 (21:30 +0000)
The modules cache path shouldn't be included in crash reports, as it's
a system (or run) specific directory.

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

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

index 2775d892f7803238570fdf8301efb0c68fccf392..e5292719df2ebbac1a25c3d9c804d2fa13263080 100644 (file)
@@ -62,7 +62,8 @@ static int skipArgs(const char *Flag) {
 
   // These flags are treated as a single argument (e.g., -F<Dir>).
   StringRef FlagRef(Flag);
-  if (FlagRef.startswith("-F") || FlagRef.startswith("-I"))
+  if (FlagRef.startswith("-F") || FlagRef.startswith("-I") ||
+      FlagRef.startswith("-fmodules-cache-path="))
     return 1;
 
   return 0;
index 95c57f238e0acc3e56ab2ec382133a568b7e3dd8..acc1abdc4e3c4fdcc22a5a08c904b7fdc8c0e07b 100644 (file)
@@ -3,6 +3,7 @@
 // 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:  -iprefix /the/prefix -iwithprefix /tmp -iwithprefixbefore /tmp/ \
+// RUN:  -fmodules -fcxx-modules -fmodules-cache-path=/tmp/              \
 // RUN:  -Xclang -internal-isystem -Xclang /tmp/                         \
 // RUN:  -Xclang -internal-externc-isystem -Xclang /tmp/                 \
 // RUN:  -DFOO=BAR 2>&1 | FileCheck %s
@@ -33,6 +34,7 @@ FOO
 // CHECKSH-NOT: -iprefix /the/prefix
 // CHECKSH-NOT: -iwithprefix /tmp/
 // CHECKSH-NOT: -iwithprefixbefore /tmp/
+// CHECKSH-NOT: -fmodules-cache-path=/tmp/
 // CHECKSH-NOT: -internal-isystem /tmp/
 // CHECKSH-NOT: -internal-externc-isystem /tmp/
 // CHECKSH-NOT: -dwarf-debug-flags