]> gcc.gnu.org Git - gcc.git/commit
arm: Remove use of opts_set in arm_configure_build_target [PR100767]
authorRichard Earnshaw <rearnsha@arm.com>
Thu, 27 May 2021 09:25:37 +0000 (10:25 +0100)
committerRichard Earnshaw <rearnsha@arm.com>
Thu, 27 May 2021 10:02:22 +0000 (11:02 +0100)
commit0faee8bae391fab7e1ba4a494360dd9793e15fb5
treef41d91e3324ddb2ca719aca3e48f9afa226c6c91
parent4290ac957ce13ab6097acda4b23cfd6ecf60b782
arm: Remove use of opts_set in arm_configure_build_target [PR100767]

The variable global_options_set is a reflection of which options have
been explicitly set from the command line in the structure
global_options.  But it doesn't describe the contents of a
cl_target_option.  cl_target_option is a set of options to apply and
once configured should represent a viable set of options without
needing to know which were explicitly set by the user.

Unfortunately arm_configure_build_target was incorrectly conflating
the two.  Fortunately, however, we do not really need to know this
since the various override_options functions should have sanitized the
target_options values before constructing a cl_target_option
structure.  It is safe, therefore, to simply drop this parameter to
arm_configure_build_target and rely on checking that various string
parameters are non-null before dereferencing them.

gcc:

PR target/100767
* config/arm/arm.c (arm_configure_build_target): Remove parameter
opts_set, directly check opts parameters for being non-null.
(arm_option_restore): Update call to arm_configure_build_target.
(arm_option_override): Likewise.
(arm_can_inline_p): Likewise.
(arm_valid_target_attribute_tree): Likewise.
* config/arm/arm-c.c (arm_pragma_target_parse): Likewise.
* config/arm/arm-protos.h (arm_configure_build_target): Adjust
prototype.

(cherry picked from commit 262e75d22c350acbdf4c1fb4f224cc5d3d711eff)
gcc/config/arm/arm-c.c
gcc/config/arm/arm-protos.h
gcc/config/arm/arm.c
This page took 0.062143 seconds and 6 git commands to generate.