of owner is determined. */
void *link; /**< To store some intermediate information */
unsigned long visit; /**< visited counter for walks of the type information */
- struct dbg_info* dbi; /**< A pointer to information for debug support. */
+ struct dbg_info *dbi; /**< A pointer to information for debug support. */
/* ------------- fields for atomic entities ---------------*/
Yes, it must be here. */
unsigned irg_add_properties; /**< If (type == method_type) this is a set of additional.
graph flags if the irg of an entity is not known. */
+ unsigned irg_calling_conv; /**< If (type == method_type) this is a set of calling.
+ convention flags if the irg of an entity is not known. */
/* ------------- fields for analyses ---------------*/
# endif /* DEBUG_libfirm */
};
+/** Initialize entity module. */
+void firm_init_entity(void);
/* ----------------------- inline functions ------------------------ */
ent->irg_add_properties |= flag;
}
+static INLINE unsigned
+_get_entity_calling_convention(const entity *ent) {
+ ir_graph *irg;
+ assert(ent && ent->kind == k_entity);
+ assert(ent == unknown_entity || is_Method_type(ent->type));
+ irg = _get_entity_irg(ent);
+ if (irg)
+ return get_irg_calling_convention(irg);
+ else
+ return ent->irg_calling_conv;
+}
+
+static INLINE void
+_set_entity_calling_convention(entity *ent, unsigned cc_mask) {
+ ir_graph *irg;
+ assert(ent && ent->kind == k_entity);
+ assert(ent == unknown_entity || is_Method_type(ent->type));
+ irg = _get_entity_irg(ent);
+ if (irg)
+ set_irg_calling_convention(irg, cc_mask);
+ else
+ ent->irg_calling_conv = cc_mask;
+}
+
#define is_entity(thing) _is_entity(thing)
#define get_entity_name(ent) _get_entity_name(ent)
#define get_entity_ident(ent) _get_entity_ident(ent)
#define get_entity_additional_properties(ent) _get_entity_additional_properties(ent)
#define set_entity_additional_properties(ent, m) _set_entity_additional_properties(ent, m)
#define set_entity_additional_property(ent, f) _set_entity_additional_property(ent, f)
+#define get_entity_calling_convention(ent) _get_entity_calling_convention(ent)
+#define set_entity_calling_convention(ent, cc) _set_entity_calling_convention(ent, cc)
# endif /* _ENTITY_T_H_ */