From 95a8b8df0ecff25e6a0f290fffd28ec5d1ec2466 Mon Sep 17 00:00:00 2001 From: Matthias Braun Date: Mon, 12 Dec 2011 15:58:40 +0100 Subject: [PATCH] Remove .*_ptr variants of firm-types Define them in your own project if you must use them. --- include/libfirm/firm_types.h | 41 ++++++++++++++++-------------------- include/libfirm/iroptimize.h | 4 ++-- 2 files changed, 20 insertions(+), 25 deletions(-) diff --git a/include/libfirm/firm_types.h b/include/libfirm/firm_types.h index a25f25018..aa89b1145 100644 --- a/include/libfirm/firm_types.h +++ b/include/libfirm/firm_types.h @@ -32,39 +32,39 @@ typedef unsigned long ir_exc_region_t; typedef unsigned long ir_label_t; /** @ingroup dbg_info */ -typedef struct dbg_info dbg_info, *dbg_info_ptr; +typedef struct dbg_info dbg_info; /** @ingroup dbg_info */ -typedef struct type_dbg_info type_dbg_info, *type_dbg_info_ptr; +typedef struct type_dbg_info type_dbg_info; /** @ingroup ir_ident */ -typedef struct ident ident, *ir_ident_ptr; +typedef struct ident ident; /** @ingroup ir_node */ -typedef struct ir_node ir_node, *ir_node_ptr; +typedef struct ir_node ir_node; /** @ingroup ir_op */ -typedef struct ir_op ir_op, *ir_op_ptr; +typedef struct ir_op ir_op; /** @ingroup ir_mode */ -typedef struct ir_mode ir_mode, *ir_mode_ptr; +typedef struct ir_mode ir_mode; /** @ingroup iredges */ -typedef struct ir_edge_t ir_edge_t, *ir_edge_ptr; +typedef struct ir_edge_t ir_edge_t; /** @ingroup ir_heights */ typedef struct ir_heights_t ir_heights_t; /** @ingroup ir_tarval */ -typedef struct ir_tarval ir_tarval, *ir_tarval_ptr; -typedef struct ir_enum_const ir_enum_const, *ir_enum_const_ptr; +typedef struct ir_tarval ir_tarval; +typedef struct ir_enum_const ir_enum_const; /** @ingroup ir_type */ -typedef struct ir_type ir_type, *ir_type_ptr; +typedef struct ir_type ir_type; /** @ingroup ir_graph */ -typedef struct ir_graph ir_graph, *ir_graph_ptr; +typedef struct ir_graph ir_graph; /** @ingroup ir_prog */ -typedef struct ir_prog ir_prog, *ir_prog_ptr; +typedef struct ir_prog ir_prog; /** @ingroup ir_loop */ -typedef struct ir_loop ir_loop, *ir_loop_ptr; +typedef struct ir_loop ir_loop; /** @ingroup ir_entity */ -typedef struct ir_entity ir_entity, *ir_entity_ptr; -typedef struct ir_extblk ir_extblk, *ir_extblk_ptr; +typedef struct ir_entity ir_entity; +typedef struct ir_extblk ir_extblk; /** @ingroup execfreq */ -typedef struct ir_exec_freq ir_exec_freq, *ir_exec_freq_ptr; +typedef struct ir_exec_freq ir_exec_freq; /** @ingroup ir_cdep */ -typedef struct ir_cdep ir_cdep, *ir_cdep_ptr; +typedef struct ir_cdep ir_cdep; /** @ingroup ir_op */ typedef struct arch_irn_ops_t arch_irn_ops_t; typedef struct ir_graph_pass_t ir_graph_pass_t; @@ -74,7 +74,7 @@ typedef struct ir_graph_pass_manager_t ir_graph_pass_manager_t; typedef struct ir_prog_pass_manager_t ir_prog_pass_manager_t; /** @ingroup ir_initializer */ -typedef union ir_initializer_t ir_initializer_t, *ir_initializer_ptr; +typedef union ir_initializer_t ir_initializer_t; typedef void irg_walk_func(ir_node *, void *); @@ -85,11 +85,6 @@ typedef void irg_walk_func(ir_node *, void *); */ typedef struct ir_switch_table ir_switch_table; -/* Needed for MSVC to suppress warnings because it doest NOT handle const right. */ -typedef const ir_node *ir_node_cnst_ptr; - -/* states */ - /** * This function is called, whenever a local variable is used before definition * diff --git a/include/libfirm/iroptimize.h b/include/libfirm/iroptimize.h index 57d8b7ff8..7f6944a46 100644 --- a/include/libfirm/iroptimize.h +++ b/include/libfirm/iroptimize.h @@ -1044,7 +1044,7 @@ FIRM_API ir_graph_pass_t *fixpoint_vrp_irg_pass(const char *name); * @param confirm if n is confirmed to be != 0, returns * the the Confirm-node, else NULL */ -FIRM_API int value_not_zero(const ir_node *n, ir_node_cnst_ptr *confirm); +FIRM_API int value_not_zero(const ir_node *n, const ir_node **confirm); /** * Check, if the value of a node cannot represent a NULL pointer. @@ -1059,7 +1059,7 @@ FIRM_API int value_not_zero(const ir_node *n, ir_node_cnst_ptr *confirm); * @param confirm if n is confirmed to be != NULL, returns * the the Confirm-node, else NULL */ -FIRM_API int value_not_null(const ir_node *n, ir_node_cnst_ptr *confirm); +FIRM_API int value_not_null(const ir_node *n, const ir_node **confirm); /** * Check, if the value of a node can be confirmed >= 0 or <= 0, -- 2.20.1