diff options
Diffstat (limited to 'gcc/objc/objc-act.c')
-rw-r--r-- | gcc/objc/objc-act.c | 110 |
1 files changed, 55 insertions, 55 deletions
diff --git a/gcc/objc/objc-act.c b/gcc/objc/objc-act.c index a99ee52..b718714 100644 --- a/gcc/objc/objc-act.c +++ b/gcc/objc/objc-act.c @@ -1432,7 +1432,7 @@ build_objc_string_object (tree string) } else { - initlist = build_tree_list (fields, build_int_2 (0, 0)); + initlist = build_tree_list (fields, build_int_cst (NULL_TREE, 0, 0)); } fields = TREE_CHAIN (fields); @@ -1443,7 +1443,7 @@ build_objc_string_object (tree string) fields = TREE_CHAIN (fields); - initlist = tree_cons (fields, build_int_2 (length, 0), initlist); + initlist = tree_cons (fields, build_int_cst (NULL_TREE, length, 0), initlist); constructor = objc_build_constructor (constant_string_type, nreverse (initlist)); @@ -1596,7 +1596,7 @@ build_objc_symtab_template (void) (FIELD_DECL, build_array_type (ptr_type_node, - build_index_type (build_int_2 (index, 0))), + build_index_type (build_int_cst (NULL_TREE, index, 0))), "defs"); chainon (field_decl_chain, field_decl); } @@ -1641,7 +1641,7 @@ init_def_list (tree type) if (static_instances_decl) expr = build_unary_op (ADDR_EXPR, static_instances_decl, 0); else - expr = build_int_2 (0, 0); + expr = build_int_cst (NULL_TREE, 0, 0); initlist = tree_cons (NULL_TREE, expr, initlist); } @@ -1658,12 +1658,12 @@ init_objc_symtab (tree type) /* sel_ref_cnt = { ..., 5, ... } */ - initlist = build_tree_list (NULL_TREE, build_int_2 (0, 0)); + initlist = build_tree_list (NULL_TREE, build_int_cst (NULL_TREE, 0, 0)); /* refs = { ..., _OBJC_SELECTOR_TABLE, ... } */ if (flag_next_runtime || ! sel_ref_chain) - initlist = tree_cons (NULL_TREE, build_int_2 (0, 0), initlist); + initlist = tree_cons (NULL_TREE, build_int_cst (NULL_TREE, 0, 0), initlist); else initlist = tree_cons (NULL_TREE, build_unary_op (ADDR_EXPR, @@ -1672,11 +1672,11 @@ init_objc_symtab (tree type) /* cls_def_cnt = { ..., 5, ... } */ - initlist = tree_cons (NULL_TREE, build_int_2 (imp_count, 0), initlist); + initlist = tree_cons (NULL_TREE, build_int_cst (NULL_TREE, imp_count, 0), initlist); /* cat_def_cnt = { ..., 5, ... } */ - initlist = tree_cons (NULL_TREE, build_int_2 (cat_count, 0), initlist); + initlist = tree_cons (NULL_TREE, build_int_cst (NULL_TREE, cat_count, 0), initlist); /* cls_def = { ..., { &Foo, &Bar, ...}, ... } */ @@ -1777,7 +1777,7 @@ init_module_descriptor (tree type) /* version = { 1, ... } */ - expr = build_int_2 (OBJC_VERSION, 0); + expr = build_int_cst (NULL_TREE, OBJC_VERSION, 0); initlist = build_tree_list (NULL_TREE, expr); /* size = { ..., sizeof (struct objc_module), ... } */ @@ -1795,7 +1795,7 @@ init_module_descriptor (tree type) if (UOBJC_SYMBOLS_decl) expr = build_unary_op (ADDR_EXPR, UOBJC_SYMBOLS_decl, 0); else - expr = build_int_2 (0, 0); + expr = build_int_cst (NULL_TREE, 0, 0); initlist = tree_cons (NULL_TREE, expr, initlist); return objc_build_constructor (type, nreverse (initlist)); @@ -2002,7 +2002,7 @@ generate_static_references (void) } /* Output {..., NULL}. */ - initlist = tree_cons (NULL_TREE, build_int_2 (0, 0), initlist); + initlist = tree_cons (NULL_TREE, build_int_cst (NULL_TREE, 0, 0), initlist); expr = objc_build_constructor (TREE_TYPE (decl), nreverse (initlist)); finish_decl (decl, expr, NULL_TREE); @@ -2010,7 +2010,7 @@ generate_static_references (void) = tree_cons (NULL_TREE, build_unary_op (ADDR_EXPR, decl, 1), decls); } - decls = tree_cons (NULL_TREE, build_int_2 (0, 0), decls); + decls = tree_cons (NULL_TREE, build_int_cst (NULL_TREE, 0, 0), decls); ident = get_identifier ("_OBJC_STATIC_INSTANCES"); expr_decl = build_nt (ARRAY_REF, ident, NULL_TREE, NULL_TREE, NULL_TREE); decl_spec = tree_cons (NULL_TREE, build_pointer_type (void_type_node), @@ -2205,7 +2205,7 @@ build_selector_translation_table (void) DECL_EXTERNAL (UOBJC_SELECTOR_TABLE_decl) = 0; TREE_STATIC (UOBJC_SELECTOR_TABLE_decl) = 1; /* NULL terminate the list and fix the decl for output. */ - initlist = tree_cons (NULL_TREE, build_int_2 (0, 0), initlist); + initlist = tree_cons (NULL_TREE, build_int_cst (NULL_TREE, 0, 0), initlist); DECL_INITIAL (UOBJC_SELECTOR_TABLE_decl) = objc_ellipsis_node; initlist = objc_build_constructor (TREE_TYPE (UOBJC_SELECTOR_TABLE_decl), nreverse (initlist)); @@ -2231,7 +2231,7 @@ get_proto_encoding (tree proto) return add_objc_string (encoding, meth_var_types); } else - return build_int_2 (0, 0); + return build_int_cst (NULL_TREE, 0, 0); } /* sel_ref_chain is a list whose "value" fields will be instances of @@ -2258,7 +2258,7 @@ build_typed_selector_reference (tree ident, tree prototype) return_at_index: expr = build_unary_op (ADDR_EXPR, build_array_ref (UOBJC_SELECTOR_TABLE_decl, - build_int_2 (index, 0)), + build_int_cst (NULL_TREE, index, 0)), 1); return build_c_cast (objc_selector_type, expr); } @@ -2276,7 +2276,7 @@ build_selector_reference (tree ident) return (flag_next_runtime ? TREE_PURPOSE (*chain) : build_array_ref (UOBJC_SELECTOR_TABLE_decl, - build_int_2 (index, 0))); + build_int_cst (NULL_TREE, index, 0))); index++; chain = &TREE_CHAIN (*chain); @@ -2289,7 +2289,7 @@ build_selector_reference (tree ident) return (flag_next_runtime ? expr : build_array_ref (UOBJC_SELECTOR_TABLE_decl, - build_int_2 (index, 0))); + build_int_cst (NULL_TREE, index, 0))); } static GTY(()) int class_reference_idx; @@ -3277,7 +3277,7 @@ build_next_objc_exception_stuff (void) /* int buf[_JBLEN]; */ - index = build_index_type (build_int_2 (_JBLEN - 1, 0)); + index = build_index_type (build_int_cst (NULL_TREE, _JBLEN - 1, 0)); field_decl = create_builtin_decl (FIELD_DECL, build_array_type (integer_type_node, index), "buf"); @@ -3285,7 +3285,7 @@ build_next_objc_exception_stuff (void) /* void *pointers[4]; */ - index = build_index_type (build_int_2 (4 - 1, 0)); + index = build_index_type (build_int_cst (NULL_TREE, 4 - 1, 0)); field_decl = create_builtin_decl (FIELD_DECL, build_array_type (ptr_type_node, index), "pointers"); @@ -3523,7 +3523,7 @@ build_method_prototype_list_template (tree list_type, int size) decl_specs = build_tree_list (NULL_TREE, list_type); field_decl = build_nt (ARRAY_REF, get_identifier ("method_list"), - build_int_2 (size, 0), NULL_TREE, NULL_TREE); + build_int_cst (NULL_TREE, size, 0), NULL_TREE, NULL_TREE); field_decl = grokfield (field_decl, decl_specs, NULL_TREE); chainon (field_decl_chain, field_decl); @@ -3669,7 +3669,7 @@ generate_descriptor_table (tree type, const char *name, int size, tree list, decl_specs, 1, NULL_TREE); DECL_CONTEXT (decl) = NULL_TREE; - initlist = build_tree_list (NULL_TREE, build_int_2 (size, 0)); + initlist = build_tree_list (NULL_TREE, build_int_cst (NULL_TREE, size, 0)); initlist = tree_cons (NULL_TREE, list, initlist); finish_decl (decl, objc_build_constructor (type, nreverse (initlist)), @@ -3879,7 +3879,7 @@ generate_protocols (void) TREE_TYPE (refs_expr) = cast_type2; } else - refs_expr = build_int_2 (0, 0); + refs_expr = build_int_cst (NULL_TREE, 0, 0); /* UOBJC_INSTANCE_METHODS_decl/UOBJC_CLASS_METHODS_decl are set by generate_method_descriptors, which is called above. */ @@ -3912,14 +3912,14 @@ build_protocol_initializer (tree type, tree protocol_name, /* Filling the "isa" in with one allows the runtime system to detect that the version change...should remove before final release. */ - expr = build_int_2 (PROTOCOL_VERSION, 0); + expr = build_int_cst (NULL_TREE, PROTOCOL_VERSION, 0); TREE_TYPE (expr) = cast_type; initlist = tree_cons (NULL_TREE, expr, initlist); initlist = tree_cons (NULL_TREE, protocol_name, initlist); initlist = tree_cons (NULL_TREE, protocol_list, initlist); if (!instance_methods) - initlist = tree_cons (NULL_TREE, build_int_2 (0, 0), initlist); + initlist = tree_cons (NULL_TREE, build_int_cst (NULL_TREE, 0, 0), initlist); else { expr = build_unary_op (ADDR_EXPR, instance_methods, 0); @@ -3927,7 +3927,7 @@ build_protocol_initializer (tree type, tree protocol_name, } if (!class_methods) - initlist = tree_cons (NULL_TREE, build_int_2 (0, 0), initlist); + initlist = tree_cons (NULL_TREE, build_int_cst (NULL_TREE, 0, 0), initlist); else { expr = build_unary_op (ADDR_EXPR, class_methods, 0); @@ -4420,7 +4420,7 @@ build_ivar_list_template (tree list_type, int size) decl_specs = build_tree_list (NULL_TREE, list_type); field_decl = build_nt (ARRAY_REF, get_identifier ("ivar_list"), - build_int_2 (size, 0), NULL_TREE, NULL_TREE); + build_int_cst (NULL_TREE, size, 0), NULL_TREE, NULL_TREE); field_decl = grokfield (field_decl, decl_specs, NULL_TREE); chainon (field_decl_chain, field_decl); @@ -4468,7 +4468,7 @@ build_method_list_template (tree list_type, int size) decl_specs = build_tree_list (NULL_TREE, list_type); field_decl = build_nt (ARRAY_REF, get_identifier ("method_list"), - build_int_2 (size, 0), NULL_TREE, NULL_TREE); + build_int_cst (NULL_TREE, size, 0), NULL_TREE, NULL_TREE); field_decl = grokfield (field_decl, decl_specs, NULL_TREE); chainon (field_decl_chain, field_decl); @@ -4495,7 +4495,7 @@ build_ivar_list_initializer (tree type, tree field_decl) ivar); else /* Unnamed bit-field ivar (yuck). */ - ivar = tree_cons (NULL_TREE, build_int_2 (0, 0), ivar); + ivar = tree_cons (NULL_TREE, build_int_cst (NULL_TREE, 0, 0), ivar); /* Set type. */ encode_field_decl (field_decl, @@ -4538,7 +4538,7 @@ generate_ivars_list (tree type, const char *name, int size, tree list) decl = start_decl (synth_id_with_class_suffix (name, objc_implementation_context), decl_specs, 1, NULL_TREE); - initlist = build_tree_list (NULL_TREE, build_int_2 (size, 0)); + initlist = build_tree_list (NULL_TREE, build_int_cst (NULL_TREE, size, 0)); initlist = tree_cons (NULL_TREE, list, initlist); finish_decl (decl, @@ -4713,8 +4713,8 @@ generate_dispatch_table (tree type, const char *name, int size, tree list) decl = start_decl (synth_id_with_class_suffix (name, objc_implementation_context), decl_specs, 1, NULL_TREE); - initlist = build_tree_list (NULL_TREE, build_int_2 (0, 0)); - initlist = tree_cons (NULL_TREE, build_int_2 (size, 0), initlist); + initlist = build_tree_list (NULL_TREE, build_int_cst (NULL_TREE, 0, 0)); + initlist = tree_cons (NULL_TREE, build_int_cst (NULL_TREE, size, 0), initlist); initlist = tree_cons (NULL_TREE, list, initlist); finish_decl (decl, @@ -4846,9 +4846,9 @@ generate_protocol_list (tree i_or_p) size++; /* Build initializer. */ - initlist = tree_cons (NULL_TREE, build_int_2 (0, 0), NULL_TREE); + initlist = tree_cons (NULL_TREE, build_int_cst (NULL_TREE, 0, 0), NULL_TREE); - e = build_int_2 (size, 0); + e = build_int_cst (NULL_TREE, size, 0); TREE_TYPE (e) = cast_type; initlist = tree_cons (NULL_TREE, e, initlist); @@ -4875,18 +4875,18 @@ generate_protocol_list (tree i_or_p) expr_decl = build_nt (ARRAY_REF, synth_id_with_class_suffix ("_OBJC_PROTOCOL_REFS", i_or_p), - build_int_2 (size + 2, 0), NULL_TREE, NULL_TREE); + build_int_cst (NULL_TREE, size + 2, 0), NULL_TREE, NULL_TREE); else if (TREE_CODE (i_or_p) == CLASS_INTERFACE_TYPE) expr_decl = build_nt (ARRAY_REF, synth_id_with_class_suffix ("_OBJC_CLASS_PROTOCOLS", i_or_p), - build_int_2 (size + 2, 0), NULL_TREE, NULL_TREE); + build_int_cst (NULL_TREE, size + 2, 0), NULL_TREE, NULL_TREE); else if (TREE_CODE (i_or_p) == CATEGORY_INTERFACE_TYPE) expr_decl = build_nt (ARRAY_REF, synth_id_with_class_suffix ("_OBJC_CATEGORY_PROTOCOLS", i_or_p), - build_int_2 (size + 2, 0), NULL_TREE, NULL_TREE); + build_int_cst (NULL_TREE, size + 2, 0), NULL_TREE, NULL_TREE); else abort (); @@ -4913,14 +4913,14 @@ build_category_initializer (tree type, tree cat_name, tree class_name, initlist = tree_cons (NULL_TREE, class_name, initlist); if (!instance_methods) - initlist = tree_cons (NULL_TREE, build_int_2 (0, 0), initlist); + initlist = tree_cons (NULL_TREE, build_int_cst (NULL_TREE, 0, 0), initlist); else { expr = build_unary_op (ADDR_EXPR, instance_methods, 0); initlist = tree_cons (NULL_TREE, expr, initlist); } if (!class_methods) - initlist = tree_cons (NULL_TREE, build_int_2 (0, 0), initlist); + initlist = tree_cons (NULL_TREE, build_int_cst (NULL_TREE, 0, 0), initlist); else { expr = build_unary_op (ADDR_EXPR, class_methods, 0); @@ -4929,7 +4929,7 @@ build_category_initializer (tree type, tree cat_name, tree class_name, /* protocol_list = */ if (!protocol_list) - initlist = tree_cons (NULL_TREE, build_int_2 (0, 0), initlist); + initlist = tree_cons (NULL_TREE, build_int_cst (NULL_TREE, 0, 0), initlist); else { tree cast_type2 = groktypename @@ -4988,17 +4988,17 @@ build_shared_structure_initializer (tree type, tree isa, tree super, initlist = tree_cons (NULL_TREE, default_conversion (name), initlist); /* version = */ - initlist = tree_cons (NULL_TREE, build_int_2 (0, 0), initlist); + initlist = tree_cons (NULL_TREE, build_int_cst (NULL_TREE, 0, 0), initlist); /* info = */ - initlist = tree_cons (NULL_TREE, build_int_2 (status, 0), initlist); + initlist = tree_cons (NULL_TREE, build_int_cst (NULL_TREE, status, 0), initlist); /* instance_size = */ initlist = tree_cons (NULL_TREE, size, initlist); /* objc_ivar_list = */ if (!ivar_list) - initlist = tree_cons (NULL_TREE, build_int_2 (0, 0), initlist); + initlist = tree_cons (NULL_TREE, build_int_cst (NULL_TREE, 0, 0), initlist); else { expr = build_unary_op (ADDR_EXPR, ivar_list, 0); @@ -5007,7 +5007,7 @@ build_shared_structure_initializer (tree type, tree isa, tree super, /* objc_method_list = */ if (!dispatch_table) - initlist = tree_cons (NULL_TREE, build_int_2 (0, 0), initlist); + initlist = tree_cons (NULL_TREE, build_int_cst (NULL_TREE, 0, 0), initlist); else { expr = build_unary_op (ADDR_EXPR, dispatch_table, 0); @@ -5016,22 +5016,22 @@ build_shared_structure_initializer (tree type, tree isa, tree super, if (flag_next_runtime) /* method_cache = */ - initlist = tree_cons (NULL_TREE, build_int_2 (0, 0), initlist); + initlist = tree_cons (NULL_TREE, build_int_cst (NULL_TREE, 0, 0), initlist); else { /* dtable = */ - initlist = tree_cons (NULL_TREE, build_int_2 (0, 0), initlist); + initlist = tree_cons (NULL_TREE, build_int_cst (NULL_TREE, 0, 0), initlist); /* subclass_list = */ - initlist = tree_cons (NULL_TREE, build_int_2 (0, 0), initlist); + initlist = tree_cons (NULL_TREE, build_int_cst (NULL_TREE, 0, 0), initlist); /* sibling_class = */ - initlist = tree_cons (NULL_TREE, build_int_2 (0, 0), initlist); + initlist = tree_cons (NULL_TREE, build_int_cst (NULL_TREE, 0, 0), initlist); } /* protocol_list = */ if (! protocol_list) - initlist = tree_cons (NULL_TREE, build_int_2 (0, 0), initlist); + initlist = tree_cons (NULL_TREE, build_int_cst (NULL_TREE, 0, 0), initlist); else { tree cast_type2 @@ -5050,10 +5050,10 @@ build_shared_structure_initializer (tree type, tree isa, tree super, if (flag_next_runtime) /* sel_id = NULL */ - initlist = tree_cons (NULL_TREE, build_int_2 (0, 0), initlist); + initlist = tree_cons (NULL_TREE, build_int_cst (NULL_TREE, 0, 0), initlist); /* gc_object_type = NULL */ - initlist = tree_cons (NULL_TREE, build_int_2 (0, 0), initlist); + initlist = tree_cons (NULL_TREE, build_int_cst (NULL_TREE, 0, 0), initlist); return objc_build_constructor (type, nreverse (initlist)); } @@ -5162,7 +5162,7 @@ generate_shared_structures (void) super_expr = build_c_cast (cast_type, super_expr); /* cast! */ } else - super_expr = build_int_2 (0, 0); + super_expr = build_int_cst (NULL_TREE, 0, 0); root_expr = add_objc_string (my_root_id, class_names); root_expr = build_c_cast (cast_type, root_expr); /* cast! */ @@ -9019,7 +9019,7 @@ handle_impent (struct imp_entry *impent) { tree decl, init; - init = build_int_2 (0, 0); + init = build_int_cst (NULL_TREE, 0, 0); TREE_TYPE (init) = c_common_type_for_size (BITS_PER_WORD, 1); decl = build_decl (VAR_DECL, get_identifier (string), TREE_TYPE (init)); TREE_PUBLIC (decl) = 1; @@ -9050,13 +9050,13 @@ generate_objc_image_info (void) tree_cons (NULL_TREE, build_array_type (integer_type_node, - build_index_type (build_int_2 (1, 0))), + build_index_type (build_int_cst (NULL_TREE, 1, 0))), sc_spec), 1, NULL_TREE); - initlist = build_tree_list (NULL_TREE, build_int_2 (0, 0)); - initlist = tree_cons (NULL_TREE, build_int_2 (1, 0), initlist); + initlist = build_tree_list (NULL_TREE, build_int_cst (NULL_TREE, 0, 0)); + initlist = tree_cons (NULL_TREE, build_int_cst (NULL_TREE, 1, 0), initlist); initlist = build_constructor (TREE_TYPE (decl), nreverse (initlist)); TREE_USED (decl) = DECL_IGNORED_P (decl) = DECL_ARTIFICIAL (decl) = 1; |