X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Ftr%2Ftpop_t.h;h=0035215b2deea59381c84fb6688ba2ba6cd09798;hb=e88385016800d3c56c3fa09770e9f7995c42e106;hp=1a5eeadc8c91890b17219e7169e50affe9a83312;hpb=bb9f2e36362333c6635b89f5258171b06c786608;p=libfirm diff --git a/ir/tr/tpop_t.h b/ir/tr/tpop_t.h index 1a5eeadc8..0035215b2 100644 --- a/ir/tr/tpop_t.h +++ b/ir/tr/tpop_t.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 1995-2008 University of Karlsruhe. All right reserved. + * Copyright (C) 1995-2011 University of Karlsruhe. All right reserved. * * This file is part of libFirm. * @@ -61,7 +61,7 @@ typedef void (*insert_entity_func)(ir_type *tp, ir_entity *member); /** * tp_op operations. */ -typedef struct _tp_op_ops { +typedef struct tp_op_ops { free_attrs_func free_attrs; /**< Called to free the attributes of a type. */ free_entities_func free_entities; /**< Called to free the owned entities of a type. */ free_auto_entities_func free_auto_entities; /**< Called to free the automatic allocated entities of a type. */ @@ -101,13 +101,12 @@ struct tp_op { * @param ops the tp_op operations for this type * @return A new type opcode. */ -tp_op *new_tpop (tp_opcode code, ident *name, unsigned flags, size_t attr_size, - const tp_op_ops *ops); +const tp_op *new_tpop (tp_opcode code, ident *name, unsigned flags, size_t attr_size, const tp_op_ops *ops); /** - * Free a tpop datastructure. + * Free a tpop data structure. */ -void free_tpop(tp_op *tpop); +void free_tpop(const tp_op *tpop); /** * Initialize the tpop module. @@ -118,7 +117,7 @@ void free_tpop(tp_op *tpop); * Allocates opcodes for classes, struct, method, union, array, * enumeration, pointer and primitive and sets the according values. */ -void init_tpop (void); +void init_tpop(void); /** * Finalize the tpop module. @@ -136,25 +135,25 @@ void finish_tpop(void); * @param op The type opcode to get the size for. * @return The size of the attribute of types with this opcode. */ -int get_tpop_attr_size (const tp_op *op); +size_t get_tpop_attr_size(const tp_op *op); /* ---------------- * * inline functions * * -----------------*/ -static inline tp_opcode -_get_tpop_code(const tp_op *op) { +static inline tp_opcode _get_tpop_code(const tp_op *op) +{ return op->code; } -static inline ident * -_get_tpop_ident(const tp_op *op){ +static inline ident *_get_tpop_ident(const tp_op *op) +{ return op->name; } -static inline size_t -_get_tpop_attr_size(const tp_op *op) { +static inline size_t _get_tpop_attr_size(const tp_op *op) +{ return op->attr_size; }