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/flags.h | |
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/flags.h')
-rw-r--r-- | gcc/flags.h | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/gcc/flags.h b/gcc/flags.h index 0c4409e..3415493 100644 --- a/gcc/flags.h +++ b/gcc/flags.h @@ -22,9 +22,24 @@ along with GCC; see the file COPYING3. If not see #if !defined(IN_LIBGCC2) && !defined(IN_TARGET_LIBS) && !defined(IN_RTS) -/* Names of debug_info_type, for error messages. */ +/* Names of fundamental debug info formats indexed by enum + debug_info_type. */ + extern const char *const debug_type_names[]; +/* Get enum debug_info_type of the specified debug format, for error messages. + Can be used only for individual debug format types. */ + +extern enum debug_info_type debug_set_to_format (uint32_t debug_info_set); + +/* Get the number of debug formats enabled for output. */ + +unsigned int debug_set_count (uint32_t w_symbols); + +/* Get the names of the debug formats enabled for output. */ + +const char * debug_set_names (uint32_t w_symbols); + extern void strip_off_ending (char *, int); extern int base_of_path (const char *path, const char **base_out); |