aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree.h
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2009-04-20 14:11:34 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2009-04-20 14:11:34 +0000
commit87a5b4cc3c685ec64acccc0f9fa25b6a51f60f66 (patch)
treebf0d148c757ab3059e36ba96092c021f4f472894 /gcc/tree.h
parent438c239d7629e2107dd831760835895c82f7d8f3 (diff)
downloadgcc-87a5b4cc3c685ec64acccc0f9fa25b6a51f60f66.zip
gcc-87a5b4cc3c685ec64acccc0f9fa25b6a51f60f66.tar.gz
gcc-87a5b4cc3c685ec64acccc0f9fa25b6a51f60f66.tar.bz2
expr.c (handled_component_p): Move ...
2009-04-20 Richard Guenther <rguenther@suse.de> * expr.c (handled_component_p): Move ... * tree.h (handled_component_p): ... here. * tree.def: Re-order BIT_FIELD_REF, COMPONENT_REF, ARRAY_REF, ARRAY_RANGE_REF, VIEW_CONVERT_EXPR, IMAGPART_EXPR and REALPART_EXPR to be in one group. From-SVN: r146427
Diffstat (limited to 'gcc/tree.h')
-rw-r--r--gcc/tree.h19
1 files changed, 18 insertions, 1 deletions
diff --git a/gcc/tree.h b/gcc/tree.h
index c5c855f..8902b43 100644
--- a/gcc/tree.h
+++ b/gcc/tree.h
@@ -4503,7 +4503,24 @@ extern tree get_narrower (tree, int *);
/* Return true if T is an expression that get_inner_reference handles. */
-extern int handled_component_p (const_tree);
+static inline bool
+handled_component_p (const_tree t)
+{
+ switch (TREE_CODE (t))
+ {
+ case BIT_FIELD_REF:
+ case COMPONENT_REF:
+ case ARRAY_REF:
+ case ARRAY_RANGE_REF:
+ case VIEW_CONVERT_EXPR:
+ case REALPART_EXPR:
+ case IMAGPART_EXPR:
+ return true;
+
+ default:
+ return false;
+ }
+}
/* Given an expression EXP that is a handled_component_p,
look for the ultimate containing object, which is returned and specify