[driver crash diagnostics] Strip -idirafter, -iprefix, -iwithprefix,
-iwithprefixbefore, and -isystem options, per Matt's suggestion.
rdar://11949066

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160750 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Driver/Driver.cpp b/lib/Driver/Driver.cpp
index c7819b1..da7fe18 100644
--- a/lib/Driver/Driver.cpp
+++ b/lib/Driver/Driver.cpp
@@ -521,9 +521,14 @@
         Flag.push_back("-dependency-file ");
         Flag.push_back("-fdebug-compilation-dir ");
         Flag.push_back("-fmodule-cache-path ");
+        Flag.push_back("-idirafter ");
         Flag.push_back("-include ");
         Flag.push_back("-include-pch ");
+        Flag.push_back("-iprefix ");
+        Flag.push_back("-iwithprefix ");
+        Flag.push_back("-iwithprefixbefore ");
         Flag.push_back("-isysroot ");
+        Flag.push_back("-isystem ");
         Flag.push_back("-iquote ");
         Flag.push_back("-resource-dir ");
         Flag.push_back("-serialize-diagnostic-file ");
diff --git a/test/Driver/crash-report.c b/test/Driver/crash-report.c
index fd45f48..7c7d3ab 100644
--- a/test/Driver/crash-report.c
+++ b/test/Driver/crash-report.c
@@ -1,7 +1,9 @@
 // RUN: rm -rf %t
 // RUN: mkdir %t
 // RUN: env TMPDIR=%t TEMP=%t TMP=%t %clang -fsyntax-only %s \
-// RUN:  -F/tmp/ -I /tmp/ -iquote /tmp/ -DFOO=BAR 2>&1 | FileCheck %s
+// RUN:  -F/tmp/ -I /tmp/ -idirafter /tmp/ -iquote /tmp/ -isystem /tmp/ \
+// RUN:  -iprefix /the/prefix -iwithprefix /tmp -iwithprefixbefore /tmp/ \
+// RUN:  -DFOO=BAR 2>&1 | FileCheck %s
 // RUN: cat %t/crash-report-*.c | FileCheck --check-prefix=CHECKSRC %s
 // RUN: cat %t/crash-report-*.sh | FileCheck --check-prefix=CHECKSH %s
 // REQUIRES: crash-recovery
@@ -14,4 +16,9 @@
 // CHECKSH: -D "FOO=BAR"
 // CHECKSH-NOT: -F/tmp/
 // CHECKSH-NOT: -I /tmp/
+// CHECKSH-NOT: -idirafter /tmp/
 // CHECKSH-NOT: -iquote /tmp/
+// CHECKSH-NOT: -isystem /tmp/
+// CHECKSH-NOT: -iprefix /the/prefix
+// CHECKSH-NOT: -iwithprefix /tmp/
+// CHECKSH-NOT: -iwithprefixbefore /tmp/