[cfe-commits] r160743 - in /cfe/trunk: lib/Driver/Driver.cpp test/Driver/crash-report.c

Chad Rosier mcrosier at apple.com
Wed Jul 25 11:43:34 PDT 2012


On Jul 25, 2012, at 11:01 AM, Matt Beaumont-Gay wrote:

> On Wed, Jul 25, 2012 at 10:52 AM, Chad Rosier <mcrosier at apple.com> wrote:
> Author: mcrosier
> Date: Wed Jul 25 12:52:16 2012
> New Revision: 160743
> 
> URL: http://llvm.org/viewvc/llvm-project?rev=160743&view=rev
> Log:
> [driver crash diagnostics] A few enhancements:
>  -Strip -iquote and -M options.
>  -Quote -D options to avoid problems with command line macros that include
>   parens.
> rdar://11949066
> 
> Modified:
>     cfe/trunk/lib/Driver/Driver.cpp
>     cfe/trunk/test/Driver/crash-report.c
> 
> Modified: cfe/trunk/lib/Driver/Driver.cpp
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Driver.cpp?rev=160743&r1=160742&r2=160743&view=diff
> ==============================================================================
> --- cfe/trunk/lib/Driver/Driver.cpp (original)
> +++ cfe/trunk/lib/Driver/Driver.cpp Wed Jul 25 12:52:16 2012
> @@ -504,8 +504,18 @@
>          // Strip away options not necessary to reproduce the crash.
>          // FIXME: This doesn't work with quotes (e.g., -D "foo bar").
>          SmallVector<std::string, 16> Flag;
> +        Flag.push_back("-D ");
>          Flag.push_back("-F");
>          Flag.push_back("-I ");
> +        Flag.push_back("-M ");
> +        Flag.push_back("-MD ");
> +        Flag.push_back("-MF ");
> +        Flag.push_back("-MG ");
> +        Flag.push_back("-MM ");
> +        Flag.push_back("-MMD ");
> +        Flag.push_back("-MP ");
> +        Flag.push_back("-MQ ");
> +        Flag.push_back("-MT ");
>          Flag.push_back("-o ");
>          Flag.push_back("-coverage-file ");
>          Flag.push_back("-dependency-file ");
> @@ -514,6 +524,7 @@
>          Flag.push_back("-include ");
>          Flag.push_back("-include-pch ");
>          Flag.push_back("-isysroot ");
> +        Flag.push_back("-iquote ");
> 
> Should we also strip -isystem and friends?

Added a few more in r160750.  Let me know if there are any more flags you think should be removed.  Thanks, Matt.

 Chad
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20120725/c51bd8cf/attachment.html>


More information about the cfe-commits mailing list