From 57a5a4d35855db14a1968e2dbc3053c9ad2b3d29 Mon Sep 17 00:00:00 2001 From: Hannes Jakschitsch Date: Tue, 1 Mar 2005 16:11:27 +0000 Subject: [PATCH] header file fixes --- ir/be/beasm_asm_gnu.c | 4 ++++ ir/be/beasm_asm_gnu.h | 5 ++--- ir/be/beasm_dump_globals.c | 13 +++++++++++-- ir/be/beasm_types.h | 4 +--- 4 files changed, 18 insertions(+), 8 deletions(-) diff --git a/ir/be/beasm_asm_gnu.c b/ir/be/beasm_asm_gnu.c index d57c7af93..0b57eec6d 100644 --- a/ir/be/beasm_asm_gnu.c +++ b/ir/be/beasm_asm_gnu.c @@ -1,4 +1,8 @@ +#include +#include + +#include "obst.h" #include "beasm_asm_gnu.h" static struct obstack *get_obstack_for_segment ( gnuasm_privdata_t *privdata, asm_segment_t segment ) { diff --git a/ir/be/beasm_asm_gnu.h b/ir/be/beasm_asm_gnu.h index a3c735303..c3a7f9259 100644 --- a/ir/be/beasm_asm_gnu.h +++ b/ir/be/beasm_asm_gnu.h @@ -3,10 +3,9 @@ #include "beasm_dump_globals.h" -//#include +#include "obst.h" + -#include -#include #define obstack_chunk_alloc xmalloc #define obstack_chunk_free free diff --git a/ir/be/beasm_dump_globals.c b/ir/be/beasm_dump_globals.c index 77b17a5eb..d0ffcada0 100644 --- a/ir/be/beasm_dump_globals.c +++ b/ir/be/beasm_dump_globals.c @@ -4,6 +4,15 @@ * @date 19.01.2005 */ +#include +#include +#include + +#include "irprog_t.h" +#include "type.h" +#include "xmalloc.h" + + #include "beasm_dump_globals.h" @@ -299,7 +308,7 @@ static void asm_dump_global ( assembler_t *assembler, entity *ent) */ type_size = get_type_size_bytes(ty); - vals = calloc(type_size, sizeof(*vals)); + vals = xcalloc(type_size, sizeof(*vals)); /* collect the values and store them at the offsets */ for(i = 0; i < get_compound_ent_n_values(ent); ++i) { @@ -314,7 +323,7 @@ static void asm_dump_global ( assembler_t *assembler, entity *ent) /* get the access path to the costant value */ graph_length = get_compound_graph_path_length(path); - ai = calloc(graph_length, sizeof(struct arr_info)); + ai = xcalloc(graph_length, sizeof(struct arr_info)); /* We wanna know how many arrays are on the path to the entity. We also have to know how * many elements each array holds to calculate the offset for the entity. */ diff --git a/ir/be/beasm_types.h b/ir/be/beasm_types.h index 85a60393a..06352a57b 100644 --- a/ir/be/beasm_types.h +++ b/ir/be/beasm_types.h @@ -7,9 +7,7 @@ #ifndef _BEASM_TYPES_H #define _BEASM_TYPES_H -#include -#include -#include "libfirm/firm.h" +#include "tv.h" /** -- 2.20.1