just to creste ir ir/ directory
[libfirm] / ir / tr / entity.c
index 1c056e2..eb4d407 100644 (file)
@@ -5,7 +5,12 @@
 **
 */
 
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
 # include <stdlib.h>
+# include <stddef.h>
 # include "entity_t.h"
 # include "entity.h"
 # include "mangle.h"
@@ -57,17 +62,11 @@ new_entity (type *owner, ident *name, type *type)
   return res;
 }
 
-#if 0
-inline char *
+inline const char *
 get_entity_name (entity *ent) {
   assert (ent);
   return id_to_str(get_entity_ident(ent));
-  /* GL:
-     entity.c:52: warning: return discards `const' from pointer target type
-     -- ned so guud
-  */
 }
-#endif
 
 ident *
 get_entity_ident    (entity *ent) {
@@ -122,6 +121,16 @@ set_entity_type (entity *ent, type *type) {
   ent->type = type;
 }
 
+inline int
+get_entity_offset (entity *ent) {
+  return ent->offset;
+}
+
+inline void
+set_entity_offset (entity *ent, int offset) {
+  ent->offset = offset;
+}
+
 inline ir_graph *
 get_entity_irg(entity *ent) {
   assert (ent);