diff options
author | alalaw01 <alalaw01@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-10-30 19:03:14 +0000 |
---|---|---|
committer | alalaw01 <alalaw01@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-10-30 19:03:14 +0000 |
commit | ff9436376143f4a11ced7295fdc2b040bb04f70a (patch) | |
tree | 048ba4fc557bff29b1270bd479190d404999156b /gcc/fold-const.h | |
parent | ab50af2a61a65a027bb4bba7c7dc4cc9fbfd1a19 (diff) | |
download | gcc-ff9436376143f4a11ced7295fdc2b040bb04f70a.tar.gz |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229605 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fold-const.h')
-rw-r--r-- | gcc/fold-const.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/gcc/fold-const.h b/gcc/fold-const.h index 8e49c98b9c5..97d18cf0e22 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) |