> Index: gcc/input.c
> ===================================================================
> --- gcc/input.c (revision 210338)
> +++ gcc/input.c (working copy)
> @@ -910,6 +910,8 @@ location_with_discriminator (location_t locus, int
>        : next_discriminator_location);
>
>    next_discriminator_location++;
> +  if (next_discriminator_location > line_table->highest_location)
> +    line_table->highest_location = next_discriminator_location;
>    return ret;
>  }

It seems to me that if something is breaking because highest_location
isn't getting updated, there's a deeper problem. The discriminator
handling depends on the fact that the line table doesn't ever add any
new values after min_discriminator_location is set, and the routines
in libcpp shouldn't ever see a location_t value above
min_discriminator_location (it should be converted to a "real"
location_t via map_discriminator_location()). If libcpp now assigns
new location_t values after we start handing out discriminators, then
we'll probably need to have libcpp start handling discriminator values
(which is the solution for LTO as well). If you're just seeing leakage
of discriminator locations into libcpp, there's probably a spot where
we need to call map_discriminator_location().

-cary

Reply via email to