remove ENTITY_INVALID
[cparser] / entity_t.h
index 643f316..fe0ad0b 100644 (file)
@@ -28,8 +28,7 @@
 #include "builtins.h"
 
 typedef enum {
-       ENTITY_INVALID,
-       ENTITY_VARIABLE,
+       ENTITY_VARIABLE = 1,
        ENTITY_COMPOUND_MEMBER,
        ENTITY_PARAMETER,
        ENTITY_FUNCTION,
@@ -210,6 +209,8 @@ struct compound_member_t {
        declaration_t  base;
        il_size_t      offset;     /**< the offset of this member in the compound */
        unsigned char  bit_offset; /**< extra bit offset for bitfield members */
+       unsigned char  bit_size;   /**< bitsize for bitfield members */
+       bool           bitfield      : 1;  /**< member is (part of) a bitfield */
        bool           read          : 1;
        bool           address_taken : 1;  /**< Set if the address of this
                                                declaration was taken. */
@@ -304,7 +305,7 @@ static inline bool is_declaration(const entity_t *entity)
 
 const char *get_entity_kind_name(entity_kind_t kind);
 
-entity_t *allocate_entity_zero(entity_kind_t, entity_namespace_t);
+entity_t *allocate_entity_zero(entity_kind_t, entity_namespace_t, symbol_t*);
 
 elf_visibility_tag_t get_elf_visibility_from_string(const char *string);