aboutsummaryrefslogtreecommitdiff
path: root/gcc/fold-const.h
diff options
context:
space:
mode:
authorAlan Lawrence <alan.lawrence@arm.com>2015-10-30 19:03:14 +0000
committerAlan Lawrence <alalaw01@gcc.gnu.org>2015-10-30 19:03:14 +0000
commit6a6360148aac759fe9fffbbf57e914d281509d72 (patch)
tree048ba4fc557bff29b1270bd479190d404999156b /gcc/fold-const.h
parent3b1661a9b93fe8000faa6ab4b721a96ffb48d525 (diff)
downloadgcc-6a6360148aac759fe9fffbbf57e914d281509d72.zip
gcc-6a6360148aac759fe9fffbbf57e914d281509d72.tar.gz
gcc-6a6360148aac759fe9fffbbf57e914d281509d72.tar.bz2
Share code from fold_array_ctor_reference with fold.
* gimple-fold.c (fold_array_ctor_reference): Move searching code to: * fold-const.c (get_array_ctor_element_at_index): New. (fold): Remove binary-search through CONSTRUCTOR, call previous. * fold-const.h (get_array_ctor_element_at_index): New. From-SVN: r229605
Diffstat (limited to 'gcc/fold-const.h')
-rw-r--r--gcc/fold-const.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/gcc/fold-const.h b/gcc/fold-const.h
index 8e49c98..97d18cf 100644
--- a/gcc/fold-const.h
+++ b/gcc/fold-const.h
@@ -73,6 +73,7 @@ extern tree fold_build_call_array_loc (location_t, tree, tree, int, tree *);
#define fold_build_call_array_initializer(T1,T2,N,T4)\
fold_build_call_array_initializer_loc (UNKNOWN_LOCATION, T1, T2, N, T4)
extern tree fold_build_call_array_initializer_loc (location_t, tree, tree, int, tree *);
+extern tree get_array_ctor_element_at_index (tree, offset_int);
extern bool fold_convertible_p (const_tree, const_tree);
#define fold_convert(T1,T2)\
fold_convert_loc (UNKNOWN_LOCATION, T1, T2)