Skip to content
Snippets Groups Projects
Commit 5d8fc020 authored by Tom Tromey's avatar Tom Tromey Committed by Marc Poulhiès
Browse files

ada: Emit enums rather than defines for various constants

This patch changes xsnamest and gen_il-gen to emit various constants
as enums rather than a sequence of preprocessor defines.  This enables
better debugging and somewhat better type safety.

gcc/ada/

	* fe.h (Convention): Now inline function.
	* gen_il-gen.adb (Put_C_Type_And_Subtypes.Put_Enum_Lit)
	(Put_C_Type_And_Subtypes.Put_Kind_Subtype, Put_C_Getter):
	Emit enum.
	* snames.h-tmpl (Name_Id, Name_, Attribute_Id, Attribute_)
	(Convention_Id, Convention_, Pragma_Id, Pragma_): Now enum.
	(Get_Attribute_Id, Get_Pragma_Id): Now inline functions.
	* types.h (Node_Kind, Entity_Kind, Convention_Id, Name_Id):
	Now enum.
	* xsnamest.adb (Output_Header_Line, Make_Value): Emit enum.
parent 7e448f3c
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment