diff options
author | Indu Bhagat <indu.bhagat@oracle.com> | 2021-04-30 07:52:40 -0700 |
---|---|---|
committer | David Faust <david.faust@oracle.com> | 2021-05-20 12:39:33 -0700 |
commit | 459d84e9b6e925922246b6aff76a5202b1d4d4ba (patch) | |
tree | 14bbc582c3a077083184c01d5cf49700df9e6111 /gcc/toplev.c | |
parent | 9480491a6447576e8e695b8ea3c4989cf72c9670 (diff) | |
download | gcc-459d84e9b6e925922246b6aff76a5202b1d4d4ba.zip gcc-459d84e9b6e925922246b6aff76a5202b1d4d4ba.tar.gz gcc-459d84e9b6e925922246b6aff76a5202b1d4d4ba.tar.bz2 |
opts: change write_symbols to support bitmasks
To support multiple debug formats, we need to move away from explicit
enumeration of each individual combination of debug formats.
gcc/c-family/ChangeLog:
* c-opts.c (c_common_post_options): Adjust access to debug_type_names.
* c-pch.c (struct c_pch_validity): Use type uint32_t.
(pch_init): Renamed member.
(c_common_valid_pch): Adjust access to debug_type_names.
gcc/ChangeLog:
* common.opt: Change type to support bitmasks.
* flag-types.h (enum debug_info_type): Rename enumerator constants.
(NO_DEBUG): New bitmask.
(DBX_DEBUG): Likewise.
(DWARF2_DEBUG): Likewise.
(XCOFF_DEBUG): Likewise.
(VMS_DEBUG): Likewise.
(VMS_AND_DWARF2_DEBUG): Likewise.
* flags.h (debug_set_to_format): New function declaration.
(debug_set_count): Likewise.
(debug_set_names): Likewise.
* opts.c (debug_type_masks): Array of bitmasks for debug formats.
(debug_set_to_format): New function definition.
(debug_set_count): Likewise.
(debug_set_names): Likewise.
(set_debug_level): Update access to debug_type_names.
* toplev.c: Likewise.
gcc/objc/ChangeLog:
* objc-act.c (synth_module_prologue): Use uint32_t instead of enum
debug_info_type.
gcc/testsuite/ChangeLog:
* gcc.dg/pch/valid-1.c: Adjust diagnostic message in testcase.
* lib/dg-pch.exp: Adjust diagnostic message.
Diffstat (limited to 'gcc/toplev.c')
-rw-r--r-- | gcc/toplev.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/gcc/toplev.c b/gcc/toplev.c index 7e23253..1016fb9 100644 --- a/gcc/toplev.c +++ b/gcc/toplev.c @@ -1461,9 +1461,12 @@ process_options (void) debug_hooks = &dwarf2_lineno_debug_hooks; #endif else - error_at (UNKNOWN_LOCATION, - "target system does not support the %qs debug format", - debug_type_names[write_symbols]); + { + gcc_assert (debug_set_count (write_symbols) <= 1); + error_at (UNKNOWN_LOCATION, + "target system does not support the %qs debug format", + debug_type_names[debug_set_to_format (write_symbols)]); + } /* We know which debug output will be used so we can set flag_var_tracking and flag_var_tracking_uninit if the user has not specified them. */ |