Add a simulate_enum_decl langhook

Jeff Law law@redhat.com
Mon Oct 28 23:25:00 GMT 2019


On 9/26/19 6:05 AM, Richard Sandiford wrote:
> Similarly to the simulate_builtin_function_decl patch, this one
> adds a hook for simulating an enum declaration in the source
> language.  Again, the main SVE ACLE patch has tests for various
> error conditions.
> 
> Tested on aarch64-linux-gnu and x86_64-linux-gnu.  OK to install?
> 
> Richard
> 
> 
> 2019-09-26  Richard Sandiford  <richard.sandiford@arm.com>
> 
> gcc/
> 	* coretypes.h (string_int_pair): New typedef.
> 	* langhooks-def.h (LANG_HOOKS_SIMULATE_ENUM_DECL): Define.
> 	(LANG_HOOKS_FOR_TYPES_INITIALIZER): Include it.
> 	* langhooks.h (lang_hooks_for_types::simulate_enum_decl): New hook.
> 
> gcc/c/
> 	* c-tree.h (c_simulate_enum_decl): Declare.
> 	* c-decl.c (c_simulate_enum_decl): New function.
> 	* c-objc-common.h (LANG_HOOKS_SIMULATE_ENUM_DECL): Define to the above.
> 
> gcc/cp/
> 	* cp-objcp-common.h (cxx_simulate_enum_decl): Declare.
> 	(LANG_HOOKS_SIMULATE_ENUM_DECL): Define to the above.
> 	* decl.c (cxx_simulate_enum_decl): New function.
OK.
jeff



More information about the Gcc-patches mailing list