diff options
author | Nathan Froyd <froydnj@codesourcery.com> | 2010-06-29 12:21:37 +0000 |
---|---|---|
committer | Nathan Froyd <froydnj@gcc.gnu.org> | 2010-06-29 12:21:37 +0000 |
commit | 0e228dd9078e5482b605b0d778347a77e4b69152 (patch) | |
tree | 0833ec6be792c53dfbf123fe804e1cfe6e39e253 /gcc/ada/gcc-interface/decl.c | |
parent | 079e7538c0259b82dc4fd0b71c05ef918725a321 (diff) | |
download | gcc-0e228dd9078e5482b605b0d778347a77e4b69152.zip gcc-0e228dd9078e5482b605b0d778347a77e4b69152.tar.gz gcc-0e228dd9078e5482b605b0d778347a77e4b69152.tar.bz2 |
gigi.h (gnat_build_constructor): Take a VEC instead of a TREE_LIST.
* gcc-interface/gigi.h (gnat_build_constructor): Take a VEC instead
of a TREE_LIST. Update comment.
* gcc-interface/trans.c (gigi): Build a VEC instead of a TREE_LIST.
Adjust call to gnat_build_constructor.
(Attribute_to_gnu): Likewise.
(gnat_to_gnu): Likewise.
(pos_to_constructor): Likewise.
(extract_values): Likewise.
* gcc-interface/utils.c (build_template): Likewise.
(convert_vms_descriptor64): Likewise.
(convert_vms_descriptor32): Likewise.
(convert_to_fat_pointer): Likewise.
(convert): Likewise.
(unchecked_convert): Likewise.
* gcc-interface/decl.c (gnat_to_gnu_entity): Likewise.
* gcc-interface/utils2.c (build_allocator): Likewise.
(fill_vms_descriptor): Likewise.
(gnat_build_constructor): Take a VEC instead of a TREE_LIST.
(compare_elmt_bitpos): Adjust for parameters being constructor_elts
instead of TREE_LISTs.
From-SVN: r161529
Diffstat (limited to 'gcc/ada/gcc-interface/decl.c')
-rw-r--r-- | gcc/ada/gcc-interface/decl.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/gcc/ada/gcc-interface/decl.c b/gcc/ada/gcc-interface/decl.c index c2f697e..6952060 100644 --- a/gcc/ada/gcc-interface/decl.c +++ b/gcc/ada/gcc-interface/decl.c @@ -1047,15 +1047,12 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, int definition) = TYPE_PADDING_P (gnu_type) ? TYPE_FIELDS (TREE_TYPE (TYPE_FIELDS (gnu_type))) : TYPE_FIELDS (gnu_type); - gnu_expr - = gnat_build_constructor - (gnu_type, - tree_cons - (template_field, - build_template (TREE_TYPE (template_field), - TREE_TYPE (TREE_CHAIN (template_field)), - NULL_TREE), - NULL_TREE)); + VEC(constructor_elt,gc) *v = VEC_alloc (constructor_elt, gc, 1); + tree t = build_template (TREE_TYPE (template_field), + TREE_TYPE (TREE_CHAIN (template_field)), + NULL_TREE); + CONSTRUCTOR_APPEND_ELT (v, template_field, t); + gnu_expr = gnat_build_constructor (gnu_type, v); } /* Convert the expression to the type of the object except in the |