X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=include%2Flibfirm%2Firprog.h;h=66c695c991ad5110767503a156b175b0eb14dc99;hb=e1d0a7c980faef658ffd4fd63a43e74b764a7dfe;hp=e0c2422c8cd86c015273a0b9dee220abc5c50cce;hpb=d7337be4ef7938bf403e919f71844215a56e10b2;p=libfirm diff --git a/include/libfirm/irprog.h b/include/libfirm/irprog.h index e0c2422c8..66c695c99 100644 --- a/include/libfirm/irprog.h +++ b/include/libfirm/irprog.h @@ -41,6 +41,7 @@ #ifndef FIRM_IR_IRPROG_H #define FIRM_IR_IRPROG_H +#include #include "firm_types.h" #include "irgraph.h" #include "begin.h" @@ -62,14 +63,14 @@ typedef enum ir_segment_t { IR_SEGMENT_LAST = IR_SEGMENT_DESTRUCTORS } ir_segment_t; +ENUM_COUNTABLE(ir_segment_t) /** * A variable pointing to the current irp (program or module). * This variable should be considered constant. Moreover, one should use get_irp() * to get access the the irp. * - * @note - * Think of the irp as the "handle" of a program. + * @note Think of the irp as the "handle" of a program. */ FIRM_API ir_prog *irp; @@ -138,16 +139,16 @@ FIRM_API void remove_irp_irg_from_list(ir_graph *irg); FIRM_API void remove_irp_irg(ir_graph *irg); /** returns the biggest not used irg index number */ -FIRM_API int get_irp_last_idx(void); +FIRM_API size_t get_irp_last_idx(void); /** Returns the number of ir graphs in the irp. */ -FIRM_API int get_irp_n_irgs(void); +FIRM_API size_t get_irp_n_irgs(void); /** Returns the ir graph at position pos in the irp. */ -FIRM_API ir_graph *get_irp_irg(int pos); +FIRM_API ir_graph *get_irp_irg(size_t pos); /** Sets the ir graph at position pos. */ -FIRM_API void set_irp_irg(int pos, ir_graph *irg); +FIRM_API void set_irp_irg(size_t pos, ir_graph *irg); /** * Returns the type containing the entities for a segment. @@ -187,25 +188,25 @@ FIRM_API void remove_irp_type(ir_type *typ); * Returns the number of all types in the irp. * @deprecated */ -FIRM_API int get_irp_n_types(void); +FIRM_API size_t get_irp_n_types(void); /** * Returns the type at position pos in the irp. * @deprecated */ -FIRM_API ir_type *get_irp_type(int pos); +FIRM_API ir_type *get_irp_type(size_t pos); /** * Overwrites the type at position pos with another type. * @deprecated */ -FIRM_API void set_irp_type(int pos, ir_type *typ); +FIRM_API void set_irp_type(size_t pos, ir_type *typ); /** Returns the number of all modes in the irp. */ -FIRM_API int get_irp_n_modes(void); +FIRM_API size_t get_irp_n_modes(void); /** Returns the mode at position pos in the irp. */ -FIRM_API ir_mode *get_irp_mode(int pos); +FIRM_API ir_mode *get_irp_mode(size_t pos); /** Adds opcode to the list of opcodes in irp. */ FIRM_API void add_irp_opcode(ir_op *opcode); @@ -215,10 +216,10 @@ FIRM_API void add_irp_opcode(ir_op *opcode); FIRM_API void remove_irp_opcode(ir_op *opcode); /** Returns the number of all opcodes in the irp. */ -FIRM_API int get_irp_n_opcodes(void); +FIRM_API size_t get_irp_n_opcodes(void); /** Returns the opcode at position pos in the irp. */ -FIRM_API ir_op *get_irp_opcode(int pos); +FIRM_API ir_op *get_irp_opcode(size_t pos); /** Sets the generic function pointer of all opcodes to NULL */ FIRM_API void clear_irp_opcodes_generic_func(void); @@ -276,10 +277,10 @@ FIRM_API ir_label_t get_irp_next_label_nr(void); FIRM_API void add_irp_asm(ident *asm_string); /** Return the number of global asm includes. */ -FIRM_API int get_irp_n_asms(void); +FIRM_API size_t get_irp_n_asms(void); /** Return the global asm include at position pos. */ -FIRM_API ident *get_irp_asm(int pos); +FIRM_API ident *get_irp_asm(size_t pos); #include "end.h"