ent->variability = var;
}
+/* return the name of the variablity */
+const char *get_variablity_name(ent_variability var)
+{
+#define X(a) case a: return #a
+ switch (var) {
+ X(uninitialized);
+ X(initialized);
+ X(part_constant);
+ X(constant);
+ default: return "BAD VALUE";
+ }
+#undef X
+}
INLINE ent_volatility
get_entity_volatility (entity *ent) {
ent->volatility = vol;
}
+/* return the name of the volatility */
+const char *get_volatility_name(ent_volatility var)
+{
+#define X(a) case a: return #a
+ switch (var) {
+ X(non_volatile);
+ X(is_volatile);
+ default: return "BAD VALUE";
+ }
+#undef X
+}
+
INLINE peculiarity
get_entity_peculiarity (entity *ent) {
assert (ent);
ent->peculiarity = pec;
}
+/* return the name of the peculiarity */
+const char *get_peculiarity_name(peculiarity var)
+{
+#define X(a) case a: return #a
+ switch (var) {
+ X(description);
+ X(inherited);
+ X(existent);
+ default: return "BAD VALUE";
+ }
+#undef X
+}
+
/* Set has no effect for entities of type method. */
INLINE ir_node *
get_atomic_ent_value(entity *ent) {
/** Sets the variability of an entity. */
void set_entity_variability (entity *ent, ent_variability var);
+/** Return the name of the variablity. */
+const char *get_variablity_name(ent_variability var);
+
/** This enumeration flags the volatility of entities. */
typedef enum {
non_volatile, /**< The entity is not volatile */
/** Sets the volatility of an entity. */
void set_entity_volatility (entity *ent, ent_volatility vol);
+/* Return the name of the volatility. */
+const char *get_volatility_name(ent_volatility var);
+
/** Returns the offset of an entity (in a compound). Only set if layout = fixed. */
int get_entity_offset (entity *ent);
ir_graph *get_entity_irg(entity *ent);
void set_entity_irg(entity *ent, ir_graph *irg);
-/* For the definition of enumeration peculiarity see type.h */
+/** Return the peculiarity of an entity. */
peculiarity get_entity_peculiarity (entity *ent);
+
+/** Sets the peculiarity of an entity. */
void set_entity_peculiarity (entity *ent, peculiarity pec);
+/** Return the name of the peculiarity. */
+const char *get_peculiarity_name(peculiarity var);
+
/* -- Representation of constant values of entites -- */
/* Set current_ir_graph to get_const_code_irg() to generate a constant
expression. */
/** Returns true if this entity was not visited. */
bool entity_not_visited(entity *ent);
-
# endif /* _ENTITY_H_ */