r206922 - Driver: Skip the -fmodules-cache-path argument in driver crash diags

Justin Bogner mail at justinbogner.com
Tue Apr 22 14:30:18 PDT 2014


Author: bogner
Date: Tue Apr 22 16:30:17 2014
New Revision: 206922

URL: http://llvm.org/viewvc/llvm-project?rev=206922&view=rev
Log:
Driver: Skip the -fmodules-cache-path argument in driver crash diags

The modules cache path shouldn't be included in crash reports, as it's
a system (or run) specific directory.

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=206922&r1=206921&r2=206922&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/Job.cpp (original)
+++ cfe/trunk/lib/Driver/Job.cpp Tue Apr 22 16:30:17 2014
@@ -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;

Modified: cfe/trunk/test/Driver/crash-report.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/crash-report.c?rev=206922&r1=206921&r2=206922&view=diff
==============================================================================
--- cfe/trunk/test/Driver/crash-report.c (original)
+++ cfe/trunk/test/Driver/crash-report.c Tue Apr 22 16:30:17 2014
@@ -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





More information about the cfe-commits mailing list