]> git.ipfire.org Git - thirdparty/gcc.git/commit
opts: change write_symbols to support bitmasks
authorIndu Bhagat <indu.bhagat@oracle.com>
Fri, 30 Apr 2021 14:52:40 +0000 (07:52 -0700)
committerDavid Faust <david.faust@oracle.com>
Thu, 20 May 2021 19:39:33 +0000 (12:39 -0700)
commit459d84e9b6e925922246b6aff76a5202b1d4d4ba
tree14bbc582c3a077083184c01d5cf49700df9e6111
parent9480491a6447576e8e695b8ea3c4989cf72c9670
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.
gcc/c-family/c-opts.c
gcc/c-family/c-pch.c
gcc/common.opt
gcc/flag-types.h
gcc/flags.h
gcc/objc/objc-act.c
gcc/opts.c
gcc/testsuite/gcc.dg/pch/valid-1.c
gcc/testsuite/lib/dg-pch.exp
gcc/toplev.c