X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=include%2Flibfirm%2Fcompound_path.h;h=ad415fe0b8ad2d8b10fe861a32d2f00d244173ef;hb=e3f51845a3d0fc2162e36fba3eea5b17a913fe38;hp=6cf40e14fec29025c9cf8b4f01c8c6e674d621c3;hpb=2bc2dd4bd4f64982e9c5d2f1ea70d63d0eb10044;p=libfirm diff --git a/include/libfirm/compound_path.h b/include/libfirm/compound_path.h index 6cf40e14f..ad415fe0b 100644 --- a/include/libfirm/compound_path.h +++ b/include/libfirm/compound_path.h @@ -28,6 +28,7 @@ #define FIRM_COMPOUND_PATHS_H #include "firm_types.h" +#include "begin.h" typedef struct compound_graph_path compound_graph_path, *ir_compound_graph_path_ptr; @@ -35,84 +36,85 @@ typedef struct compound_graph_path compound_graph_path, *ir_compound_graph_path * @deprecated * Creates a new compound graph path of given length. */ -compound_graph_path *new_compound_graph_path(ir_type *tp, int length); +FIRM_API compound_graph_path *new_compound_graph_path(ir_type *tp, size_t length); /** * @deprecated * Returns non-zero if an object is a compound graph path */ -int is_compound_graph_path(const void *thing); +FIRM_API int is_compound_graph_path(const void *thing); /** * @deprecated * Frees a graph path object */ -void free_compound_graph_path(compound_graph_path *gr); +FIRM_API void free_compound_graph_path(compound_graph_path *gr); /** * @deprecated * Returns the length of a graph path */ -int get_compound_graph_path_length(const compound_graph_path *gr); +FIRM_API size_t get_compound_graph_path_length(const compound_graph_path *gr); /** * @deprecated * Get the entity node of an compound graph path at position pos. */ -ir_entity *get_compound_graph_path_node(const compound_graph_path *gr, int pos); +ir_entity *get_compound_graph_path_node(const compound_graph_path *gr, size_t pos); /** * @deprecated * Set the entity node of an compound graph path at position pos. */ -void set_compound_graph_path_node(compound_graph_path *gr, int pos, ir_entity *node); +FIRM_API void set_compound_graph_path_node(compound_graph_path *gr, size_t pos, + ir_entity *node); /** * @deprecated * Get the index of an compound graph path at position pos. */ -int get_compound_graph_path_array_index(const compound_graph_path *gr, int pos); +FIRM_API long get_compound_graph_path_array_index(const compound_graph_path *gr, size_t pos); /** * @deprecated * Set the index of an compound graph path at position pos. */ -void set_compound_graph_path_array_index(compound_graph_path *gr, int pos, int index); +FIRM_API void set_compound_graph_path_array_index(compound_graph_path *gr, size_t pos, long index); /** * @deprecated * Get the type of an compound graph path. */ -ir_type *get_compound_graph_path_type(const compound_graph_path *gr); +FIRM_API ir_type *get_compound_graph_path_type(const compound_graph_path *gr); /** * @deprecated * Checks whether the path up to pos is correct. If the path contains a NULL, * assumes the path is not complete and returns non-zero. */ -int is_proper_compound_graph_path(compound_graph_path *gr, int pos); +FIRM_API int is_proper_compound_graph_path(compound_graph_path *gr, size_t pos); /** * @deprecated * A value of a compound entity is a pair of a value and the description of the * corresponding access path to the member of the compound. */ -void add_compound_ent_value_w_path(ir_entity *ent, ir_node *val, compound_graph_path *path); -void set_compound_ent_value_w_path(ir_entity *ent, ir_node *val, compound_graph_path *path, int pos); +FIRM_API void add_compound_ent_value_w_path(ir_entity *ent, ir_node *val, compound_graph_path *path); +FIRM_API void set_compound_ent_value_w_path(ir_entity *ent, ir_node *val, compound_graph_path *path, size_t pos); /** * @deprecated * Returns the access path for value at position pos. */ -compound_graph_path *get_compound_ent_value_path(const ir_entity *ent, int pos); +FIRM_API compound_graph_path *get_compound_ent_value_path(const ir_entity *ent, size_t pos); /** * @deprecated * Returns a constant value given the access path. * The path must contain array indices for all array element entities. */ -ir_node *get_compound_ent_value_by_path(const ir_entity *ent, - compound_graph_path *path); +FIRM_API ir_node *get_compound_ent_value_by_path(const ir_entity *ent, + compound_graph_path *path); /** * @deprecated @@ -120,7 +122,7 @@ ir_node *get_compound_ent_value_by_path(const ir_entity *ent, * free the memory of the paths. (The same path might be used for several * constant entities. */ -void remove_compound_ent_value(ir_entity *ent, ir_entity *value_ent); +FIRM_API void remove_compound_ent_value(ir_entity *ent, ir_entity *value_ent); /** * @deprecated @@ -129,20 +131,20 @@ void remove_compound_ent_value(ir_entity *ent, ir_entity *value_ent); * avoided there. Use add_compound_ent_value_w_path() instead and create * the path manually. */ -void add_compound_ent_value(ir_entity *ent, ir_node *val, ir_entity *member); +FIRM_API void add_compound_ent_value(ir_entity *ent, ir_node *val, ir_entity *member); /** * @deprecated * Returns the last member in the path */ -ir_entity *get_compound_ent_value_member(const ir_entity *ent, int pos); +FIRM_API ir_entity *get_compound_ent_value_member(const ir_entity *ent, size_t pos); /** * @deprecated * Sets the path at pos 0 */ -void set_compound_ent_value(ir_entity *ent, ir_node *val, ir_entity *member, - int pos); +FIRM_API void set_compound_ent_value(ir_entity *ent, ir_node *val, + ir_entity *member, size_t pos); /** * @deprecated @@ -153,7 +155,7 @@ void set_compound_ent_value(ir_entity *ent, ir_node *val, ir_entity *member, * fits into the given array size. Does not test whether the * values have the proper mode for the array. */ -void set_array_entity_values(ir_entity *ent, tarval **values, int num_vals); +FIRM_API void set_array_entity_values(ir_entity *ent, ir_tarval **values, size_t num_vals); /** * @deprecated @@ -164,7 +166,7 @@ void set_array_entity_values(ir_entity *ent, tarval **values, int num_vals); * @param ent Any entity of compound type with at least pos initialization values. * @param pos The position of the value for which the offset is requested. */ -unsigned get_compound_ent_value_offset_bit_remainder(const ir_entity *ent, int pos); +FIRM_API unsigned get_compound_ent_value_offset_bit_remainder(const ir_entity *ent, size_t pos); /** * @deprecated @@ -176,25 +178,27 @@ unsigned get_compound_ent_value_offset_bit_remainder(const ir_entity *ent, int p * @param ent Any entity of compound type with at least pos initialization values. * @param pos The position of the value for which the offset is requested. */ -unsigned get_compound_ent_value_offset_bytes(const ir_entity *ent, int pos); +FIRM_API unsigned get_compound_ent_value_offset_bytes(const ir_entity *ent, size_t pos); /** * @deprecated * Returns the number of constant values needed to initialize the entity. * Asserts if the entity has variability_uninitialized. */ -int get_compound_ent_n_values(const ir_entity *ent); +FIRM_API size_t get_compound_ent_n_values(const ir_entity *ent); /** * @deprecated * Returns a constant value given the position. */ -ir_node *get_compound_ent_value(const ir_entity *ent, int pos); +FIRM_API ir_node *get_compound_ent_value(const ir_entity *ent, size_t pos); /** * @deprecated * return 1 if entity has a compound_graph-style initializer */ -int entity_has_compound_ent_values(const ir_entity *entity); +FIRM_API int entity_has_compound_ent_values(const ir_entity *entity); + +#include "end.h" #endif