@@ -16,22 +16,23 @@ void process_enum_name_value(const char * p, int val)
1616 fprintf ( code_outputfile ,"ENUM : %s %d" ,p ,val );
1717}
1818
19- void process_enum ( tree enumeral_type ) {
20- fprintf ( code_outputfile ,"BEGIN ENUM\n" );
19+ void process_enum_emit ( tree enumeral_type ) {
20+ fprintf ( code_outputfile ,"ENUM( \n" );
2121 tree tv ;
2222 /* Output the list of possible values for the enumeration type. */
2323 for (tv = TYPE_VALUES (enumeral_type ); tv ; tv = TREE_CHAIN (tv ))
2424 {
25- fprintf ( code_outputfile , "ENUM VALUE\n" );
25+
2626 tree v = TREE_VALUE (tv );
2727 // GCC 4.4 switched to consts for enum values
2828 if (TREE_CODE (v ) == CONST_DECL )
2929 v = DECL_INITIAL (v );
3030 int value = TREE_INT_CST_LOW (v );
31- process_enum_name_value (IDENTIFIER_POINTER (TREE_PURPOSE (tv )),value );
31+ fprintf ( code_outputfile ,"ENUMVALUE(\"%s\",%d),\n" ,IDENTIFIER_POINTER (TREE_PURPOSE (tv )),value );
32+ //process_enum_name_value(IDENTIFIER_POINTER (TREE_PURPOSE (tv)),value);
3233
3334 }
34- fprintf ( code_outputfile ,"END ENUM \n" );
35+ fprintf ( code_outputfile ,"0),/*enum*/ \n" );
3536 // if we want to generate code for the enum :
3637 // process_enum_tree_code(enumeral_type);
3738}
0 commit comments