[google] improves option mismatch handling for LIPO (issue4479045)
Diego Novillo
dnovillo@google.com
Thu May 5 19:46:00 GMT 2011
On Thu, May 5, 2011 at 01:36, David Li <davidxl@google.com> wrote:
> This patch improves cross module option mismatch handling in LIPO mode -- will be commited to google/main.
>
> 1) Remove duplicates in the option list before comparison;
> 2) Force module incompatiblity when two modules disagree in -fexceptions setting. In LIPO mode, when option mismatch is discovered between the primary and aux module, a warning message is emitted, but the modules will be considered incompatible when -fripa-disallow-opt-mismatch is specified. With this change, exception option mismatch will force the primary module to reject the aux module.
>
> Tested: SPEC with LIPO.
>
>
> 2011-05-04 David Li <davidxl@google.com>
>
> * coverage.c (incompatible_cl_args): Better handling
> of option mismatch.
>
> Index: coverage.c
> ===================================================================
> --- coverage.c (revision 173353)
> +++ coverage.c (working copy)
> @@ -213,6 +213,27 @@ is_last_module (unsigned mod_id)
> return (mod_id == module_infos[num_in_fnames - 1]->ident);
> }
>
> +/* String hash function */
> +
> +static hashval_t
> +str_hash (const void *p)
> +{
> + const char *s = (const char *)p;
> + return htab_hash_string (s);
> +}
You can use htab_hash_string directly. No need to wrap it further.
OK with those changes.
Diego.
More information about the Gcc-patches
mailing list