From 459d84e9b6e925922246b6aff76a5202b1d4d4ba Mon Sep 17 00:00:00 2001 From: Indu Bhagat Date: Fri, 30 Apr 2021 07:52:40 -0700 Subject: 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/objc/objc-act.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gcc/objc/objc-act.c') diff --git a/gcc/objc/objc-act.c b/gcc/objc/objc-act.c index 796256d..8d106a4 100644 --- a/gcc/objc/objc-act.c +++ b/gcc/objc/objc-act.c @@ -3078,7 +3078,7 @@ static void synth_module_prologue (void) { tree type; - enum debug_info_type save_write_symbols = write_symbols; + uint32_t save_write_symbols = write_symbols; const struct gcc_debug_hooks *const save_hooks = debug_hooks; /* Suppress outputting debug symbols, because -- cgit v1.1