X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fir%2Firprofile.c;h=dd6eb5afc1971b236f5e4e8ba9d0acf23510c4a7;hb=b59e22a229aa1227ef992c184c79fdafe34908cf;hp=20bd61e9663483daa413c208e5f2c4f814d50422;hpb=0a7d7324b9baa076d1322e82b92f8fc2c8f1892e;p=libfirm diff --git a/ir/ir/irprofile.c b/ir/ir/irprofile.c index 20bd61e96..dd6eb5afc 100644 --- a/ir/ir/irprofile.c +++ b/ir/ir/irprofile.c @@ -472,7 +472,7 @@ static ir_entity *new_static_string_entity(ident *name, const char *string) return result; } -void ir_profile_instrument(const char *filename) +ir_graph *ir_profile_instrument(const char *filename) { int n, n_blocks = 0; ident *counter_id, *filename_id; @@ -483,7 +483,7 @@ void ir_profile_instrument(const char *filename) /* Don't do anything for modules without code. Else the linker will * complain. */ if (get_irp_n_irgs() == 0) - return; + return NULL; /* count the number of block first */ n_blocks = get_irp_n_blocks(); @@ -504,7 +504,7 @@ void ir_profile_instrument(const char *filename) instrument_irg(irg, bblock_counts, &wd); } - gen_initializer_irg(ent_filename, bblock_counts, n_blocks); + return gen_initializer_irg(ent_filename, bblock_counts, n_blocks); } static unsigned int *parse_profile(const char *filename, unsigned int num_blocks)