options: Fix up opts_set saving/restoring for underlying vars of Mask/InverseMask...
authorJakub Jelinek <jakub@redhat.com>
Sat, 3 Oct 2020 19:22:03 +0000 (21:22 +0200)
committerJakub Jelinek <jakub@redhat.com>
Sat, 3 Oct 2020 19:22:03 +0000 (21:22 +0200)
commitce531b14126bf5f1dcd70224a1131198ddf58875
treeb628e50a97e2eebd0ae2d3f2f77f50bd48b037ce
parenta1f77106ec3f0005f0cfd3e1d083837afeb432f6
options: Fix up opts_set saving/restoring for underlying vars of Mask/InverseMask options

Seems I've missed that set_option has special treatment for
CLVC_BIT_CLEAR/CLVC_BIT_SET.
Which means I'll need to change the generic handling, so that for
global_options_set elements mentioned in CLVC_BIT_* options are treated
differently, instead of using the accumulated bitmasks they'll need to use
their specific bitmask variables during the option saving/restoring.

Here is a patch that implements that.

2020-10-03  Jakub Jelinek  <jakub@redhat.com>

* opth-gen.awk: For variables referenced in Mask and InverseMask,
don't use the explicit_mask bitmask array, but add separate
explicit_mask_* members with the same types as the variables.
* optc-save-gen.awk: Save, restore, compare and hash the separate
explicit_mask_* members.
gcc/optc-save-gen.awk
gcc/opth-gen.awk