aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree.h
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2015-05-27 18:00:15 +0000
committerEric Botcazou <ebotcazou@gcc.gnu.org>2015-05-27 18:00:15 +0000
commit8974754f6f12f2f032d4122b06d26319545ced00 (patch)
tree400932ae2cd83549d10a0b94fb453c26608f0409 /gcc/tree.h
parente590690ef23053ddbd5b32c119f403f418a02d6a (diff)
downloadgcc-8974754f6f12f2f032d4122b06d26319545ced00.zip
gcc-8974754f6f12f2f032d4122b06d26319545ced00.tar.gz
gcc-8974754f6f12f2f032d4122b06d26319545ced00.tar.bz2
expr.h (array_at_struct_end_p): Move to...
* expr.h (array_at_struct_end_p): Move to... (array_ref_element_size): Likewise. (component_ref_field_offset): Likewise. * tree.h (array_ref_element_size): ...here. (array_at_struct_end_p): Likewise. (component_ref_field_offset): Likewise. * expr.c (array_ref_element_size): Move to... (array_ref_low_bound): Likewise. (array_at_struct_end_p): Likewise. (array_ref_up_bound): Likewise. (component_ref_field_offset): Likewise. * tree.c (array_ref_element_size): ...here. (array_ref_low_bound): Likewise. (array_ref_up_bound): Likewise. (array_at_struct_end_p): Likewise. (component_ref_field_offset): Likewise. From-SVN: r223768
Diffstat (limited to 'gcc/tree.h')
-rw-r--r--gcc/tree.h39
1 files changed, 28 insertions, 11 deletions
diff --git a/gcc/tree.h b/gcc/tree.h
index 58d2e9b..732a61c 100644
--- a/gcc/tree.h
+++ b/gcc/tree.h
@@ -4564,8 +4564,34 @@ extern tree walk_tree_without_duplicates_1 (tree*, walk_tree_fn, void*,
#define walk_tree_without_duplicates(a,b,c) \
walk_tree_without_duplicates_1 (a, b, c, NULL)
-extern tree get_base_address (tree t);
extern tree drop_tree_overflow (tree);
+
+/* Given a memory reference expression T, return its base address.
+ The base address of a memory reference expression is the main
+ object being referenced. */
+extern tree get_base_address (tree t);
+
+/* Return a tree of sizetype representing the size, in bytes, of the element
+ of EXP, an ARRAY_REF or an ARRAY_RANGE_REF. */
+extern tree array_ref_element_size (tree);
+
+/* Return a tree representing the upper bound of the array mentioned in
+ EXP, an ARRAY_REF or an ARRAY_RANGE_REF. */
+extern tree array_ref_up_bound (tree);
+
+/* Return a tree representing the lower bound of the array mentioned in
+ EXP, an ARRAY_REF or an ARRAY_RANGE_REF. */
+extern tree array_ref_low_bound (tree);
+
+/* Returns true if REF is an array reference to an array at the end of
+ a structure. If this is the case, the array may be allocated larger
+ than its upper bound implies. */
+extern bool array_at_struct_end_p (tree);
+
+/* Return a tree representing the offset, in bytes, of the field referenced
+ by EXP. This does not include any offset in DECL_FIELD_BIT_OFFSET. */
+extern tree component_ref_field_offset (tree);
+
extern int tree_map_base_eq (const void *, const void *);
extern unsigned int tree_map_base_hash (const void *);
extern int tree_map_base_marked_p (const void *);
@@ -5052,12 +5078,6 @@ tree_int_cst_compare (const_tree t1, const_tree t2)
extern void set_decl_rtl (tree, rtx);
extern bool complete_ctor_at_level_p (const_tree, HOST_WIDE_INT, const_tree);
-/* Return a tree representing the upper bound of the array mentioned in
- EXP, an ARRAY_REF or an ARRAY_RANGE_REF. */
-extern tree array_ref_up_bound (tree);
-
-extern tree build_personality_function (const char *);
-
/* Given an expression EXP that is a handled_component_p,
look for the ultimate containing object, which is returned and specify
the access position and size. */
@@ -5065,10 +5085,7 @@ extern tree get_inner_reference (tree, HOST_WIDE_INT *, HOST_WIDE_INT *,
tree *, machine_mode *, int *, int *,
bool);
-/* Return a tree representing the lower bound of the array mentioned in
- EXP, an ARRAY_REF or an ARRAY_RANGE_REF. */
-extern tree array_ref_low_bound (tree);
-
+extern tree build_personality_function (const char *);
struct GTY(()) int_n_trees_t {
/* These parts are initialized at runtime */