summaryrefslogtreecommitdiff
path: root/gcc/java/constants.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/java/constants.c')
-rw-r--r--gcc/java/constants.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/gcc/java/constants.c b/gcc/java/constants.c
index cffd5d9cc72..d6a35136ad7 100644
--- a/gcc/java/constants.c
+++ b/gcc/java/constants.c
@@ -321,10 +321,10 @@ static GTY(()) tree tag_nodes[13];
static tree
get_tag_node (int tag)
{
- /* A Cache for build_int_2 (CONSTANT_XXX, 0). */
+ /* A Cache for build_int_cst (CONSTANT_XXX, 0). */
if (tag_nodes[tag] == NULL_TREE)
- tag_nodes[tag] = build_int_2 (tag, 0);
+ tag_nodes[tag] = build_int_cst (NULL_TREE, tag, 0);
return tag_nodes[tag];
}
@@ -424,7 +424,7 @@ tree
build_ref_from_constant_pool (int index)
{
tree d = build_constant_data_ref ();
- tree i = build_int_2 (index, 0);
+ tree i = build_int_cst (NULL_TREE, index, 0);
return build4 (ARRAY_REF, TREE_TYPE (TREE_TYPE (d)), d, i,
NULL_TREE, NULL_TREE);
}
@@ -452,11 +452,9 @@ build_constants_constructor (void)
}
if (outgoing_cpool->count > 0)
{
- tree index_type;
tree data_decl, tags_decl, tags_type;
- tree max_index = build_int_2 (outgoing_cpool->count - 1, 0);
- TREE_TYPE (max_index) = sizetype;
- index_type = build_index_type (max_index);
+ tree max_index = build_int_cst (sizetype, outgoing_cpool->count - 1, 0);
+ tree index_type = build_index_type (max_index);
/* Add dummy 0'th element of constant pool. */
tags_list = tree_cons (NULL_TREE, get_tag_node (0), tags_list);
@@ -486,7 +484,8 @@ build_constants_constructor (void)
tags_value = null_pointer_node;
}
START_RECORD_CONSTRUCTOR (cons, constants_type_node);
- PUSH_FIELD_VALUE (cons, "size", build_int_2 (outgoing_cpool->count, 0));
+ PUSH_FIELD_VALUE (cons, "size",
+ build_int_cst (NULL_TREE, outgoing_cpool->count, 0));
PUSH_FIELD_VALUE (cons, "tags", tags_value);
PUSH_FIELD_VALUE (cons, "data", data_value);
FINISH_RECORD_CONSTRUCTOR (cons);