Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Zwinkau
libfirm
Commits
b41ce1d0
Commit
b41ce1d0
authored
Sep 18, 2008
by
Michael Beck
Browse files
- add get_compound_graph_path_type()
- add some doxygen comments [r22086]
parent
6dff45b5
Changes
2
Hide whitespace changes
Inline
Side-by-side
include/libfirm/typerep.h
View file @
b41ce1d0
...
...
@@ -457,13 +457,13 @@ void set_atomic_ent_value(ir_entity *ent, ir_node *val);
/** the kind (type) of an initializer */
typedef
enum
ir_initializer_kind_t
{
/* initializer containing an ir_node from the const-code irg */
/*
*
initializer containing an ir_node from the const-code irg */
IR_INITIALIZER_CONST
,
/* initializer containing a tarval */
/*
*
initializer containing a tarval */
IR_INITIALIZER_TARVAL
,
/* initializes type with default values (usually 0) */
/*
*
initializes type with default values (usually 0) */
IR_INITIALIZER_NULL
,
/* list of initializers used to initializer a compound or array type */
/*
*
list of initializers used to initializer a compound or array type */
IR_INITIALIZER_COMPOUND
}
ir_initializer_kind_t
;
...
...
@@ -516,10 +516,16 @@ void free_compound_graph_path(compound_graph_path *gr);
/** Returns the length of a graph path */
int
get_compound_graph_path_length
(
const
compound_graph_path
*
gr
);
/** Get the entity node of an compound graph path at position pos. */
ir_entity
*
get_compound_graph_path_node
(
const
compound_graph_path
*
gr
,
int
pos
);
void
set_compound_graph_path_node
(
compound_graph_path
*
gr
,
int
pos
,
ir_entity
*
node
);
int
get_compound_graph_path_array_index
(
const
compound_graph_path
*
gr
,
int
pos
);
void
set_compound_graph_path_array_index
(
compound_graph_path
*
gr
,
int
pos
,
int
index
);
/** Set the entity node of an compound graph path at position pos. */
void
set_compound_graph_path_node
(
compound_graph_path
*
gr
,
int
pos
,
ir_entity
*
node
);
/** Get the index of an compound graph path at position pos. */
int
get_compound_graph_path_array_index
(
const
compound_graph_path
*
gr
,
int
pos
);
/** Set the index of an compound graph path at position pos. */
void
set_compound_graph_path_array_index
(
compound_graph_path
*
gr
,
int
pos
,
int
index
);
/** Get the type of an compound graph path. */
ir_type
*
get_compound_graph_path_type
(
const
compound_graph_path
*
gr
);
/** Checks whether the path up to pos is correct. If the path contains a NULL,
* assumes the path is not complete and returns non-zero. */
...
...
@@ -565,8 +571,10 @@ ir_entity *get_compound_ent_value_member(ir_entity *ent, int pos);
/** Sets the path at pos 0 */
void
set_compound_ent_value
(
ir_entity
*
ent
,
ir_node
*
val
,
ir_entity
*
member
,
int
pos
);
/** Sets the new style initializers of an entity. */
void
set_entity_initializer
(
ir_entity
*
entity
,
ir_initializer_t
*
initializer
);
/** Return the new style initializers of an entity. */
ir_initializer_t
*
get_entity_initializer
(
const
ir_entity
*
entity
);
/** Initializes the entity ent which must be of a one dimensional
...
...
ir/tr/entity.c
View file @
b41ce1d0
...
...
@@ -888,6 +888,12 @@ set_compound_graph_path_array_index(compound_graph_path *gr, int pos, int index)
gr
->
list
[
pos
].
index
=
index
;
}
/* set_compound_graph_path_array_index */
ir_type
*
get_compound_graph_path_type
(
const
compound_graph_path
*
gr
)
{
assert
(
gr
&&
is_compound_graph_path
(
gr
));
return
gr
->
tp
;
}
/* A value of a compound entity is a pair of value and the corresponding path to a member of
the compound. */
void
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment