<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Jul 25, 2012, at 11:01 AM, Matt Beaumont-Gay wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">On Wed, Jul 25, 2012 at 10:52 AM, Chad Rosier <span dir="ltr"><<a href="mailto:mcrosier@apple.com" target="_blank" class="cremed">mcrosier@apple.com</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote">
<blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; position: static; z-index: auto; ">Author: mcrosier<br>
Date: Wed Jul 25 12:52:16 2012<br>
New Revision: 160743<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=160743&view=rev" target="_blank" class="cremed">http://llvm.org/viewvc/llvm-project?rev=160743&view=rev</a><br>
Log:<br>
[driver crash diagnostics] A few enhancements:<br>
 -Strip -iquote and -M options.<br>
 -Quote -D options to avoid problems with command line macros that include<br>
  parens.<br>
<a href="rdar://11949066">rdar://11949066</a><br>
<br>
Modified:<br>
    cfe/trunk/lib/Driver/Driver.cpp<br>
    cfe/trunk/test/Driver/crash-report.c<br>
<br>
Modified: cfe/trunk/lib/Driver/Driver.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Driver.cpp?rev=160743&r1=160742&r2=160743&view=diff" target="_blank" class="cremed">http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Driver.cpp?rev=160743&r1=160742&r2=160743&view=diff</a><br>

==============================================================================<br>
--- cfe/trunk/lib/Driver/Driver.cpp (original)<br>
+++ cfe/trunk/lib/Driver/Driver.cpp Wed Jul 25 12:52:16 2012<br>
@@ -504,8 +504,18 @@<br>
         // Strip away options not necessary to reproduce the crash.<br>
         // FIXME: This doesn't work with quotes (e.g., -D "foo bar").<br>
         SmallVector<std::string, 16> Flag;<br>
+        Flag.push_back("-D ");<br>
         Flag.push_back("-F");<br>
         Flag.push_back("-I ");<br>
+        Flag.push_back("-M ");<br>
+        Flag.push_back("-MD ");<br>
+        Flag.push_back("-MF ");<br>
+        Flag.push_back("-MG ");<br>
+        Flag.push_back("-MM ");<br>
+        Flag.push_back("-MMD ");<br>
+        Flag.push_back("-MP ");<br>
+        Flag.push_back("-MQ ");<br>
+        Flag.push_back("-MT ");<br>
         Flag.push_back("-o ");<br>
         Flag.push_back("-coverage-file ");<br>
         Flag.push_back("-dependency-file ");<br>
@@ -514,6 +524,7 @@<br>
         Flag.push_back("-include ");<br>
         Flag.push_back("-include-pch ");<br>
         Flag.push_back("-isysroot ");<br>
+        Flag.push_back("-iquote ");<br></blockquote><div><br></div><div>Should we also strip -isystem and friends?</div></div></div>
</blockquote></div><br><div>Added a few more in r160750.  Let me know if there are any more flags you think should be removed.  Thanks, Matt.</div><div><br></div><div> Chad</div></body></html>