X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fbe%2Fbestabs.c;h=a5918840f6482500ddf6739b19a462ef28017f18;hb=5bb8cd35a8074112fa2da8b8f68d7c77918119e5;hp=d0bd3406e10ab027aacf38a0f4ea7971bf33ce82;hpb=14b4e9b3f48cd53db6c3179283ce8354d5127ce1;p=libfirm diff --git a/ir/be/bestabs.c b/ir/be/bestabs.c index d0bd3406e..a5918840f 100644 --- a/ir/be/bestabs.c +++ b/ir/be/bestabs.c @@ -116,7 +116,7 @@ enum stabs_types { */ typedef struct stabs_handle { dbg_handle base; /**< the base class */ - ir_entity *cur_ent; /**< current method entity */ + const ir_entity *cur_ent; /**< current method entity */ const be_stack_layout_t *layout; /**< current stack layout */ unsigned next_type_nr; /**< next type number */ pmap *type_map; /**< a map from type to type number */ @@ -176,7 +176,7 @@ typedef struct walker_env { do { \ set_type_link(tp, (void *)1); \ waitq_put(wq, tp); \ - } while(0) + } while (0) /* a the is ready */ #define SET_TYPE_READY(tp) set_type_link(tp, NULL) @@ -292,7 +292,7 @@ static void gen_enum_type(stabs_handle *h, ir_type *tp) /** * print a pointer type */ -void print_pointer_type(stabs_handle *h, ir_type *tp, int local) +static void print_pointer_type(stabs_handle *h, ir_type *tp, int local) { unsigned type_num = local ? h->next_type_nr++ : get_type_number(h, tp); ir_type *el_tp = get_pointer_points_to_type(tp); @@ -677,7 +677,7 @@ static void stabs_set_dbg_info(dbg_handle *h, dbg_info *dbgi) /** * dump the stabs for a method begin */ -static void stabs_method_begin(dbg_handle *handle, ir_entity *ent, const be_stack_layout_t *layout) +static void stabs_method_begin(dbg_handle *handle, const ir_entity *ent, const be_stack_layout_t *layout) { stabs_handle *h = (stabs_handle *)handle; ir_type *mtp, *rtp; @@ -749,7 +749,7 @@ static void stabs_method_begin(dbg_handle *handle, ir_entity *ent, const be_stac static void stabs_method_end(dbg_handle *handle) { stabs_handle *h = (stabs_handle *)handle; - ir_entity *ent = h->cur_ent; + const ir_entity *ent = h->cur_ent; const be_stack_layout_t *layout = h->layout; const char *ld_name = get_entity_ld_name(ent); int i, n, frame_size; @@ -807,7 +807,7 @@ static void stabs_types(dbg_handle *handle) /** * dump a variable in the global type */ -static void stabs_variable(dbg_handle *handle, ir_entity *ent) +static void stabs_variable(dbg_handle *handle, const ir_entity *ent) { stabs_handle *h = (stabs_handle *)handle; unsigned tp_num = get_type_number(h, get_entity_type(ent)); @@ -855,7 +855,7 @@ static const debug_ops stabs_ops = { }; /* Opens a stabs handler */ -dbg_handle *be_stabs_open(void) +static dbg_handle *be_stabs_open(void) { stabs_handle *h = XMALLOCZ(stabs_handle); @@ -865,9 +865,8 @@ dbg_handle *be_stabs_open(void) return &h->base; } +BE_REGISTER_MODULE_CONSTRUCTOR(be_init_stabs); void be_init_stabs(void) { be_register_dbgout_module("stabs", be_stabs_open); } - -BE_REGISTER_MODULE_CONSTRUCTOR(be_init_stabs);