aboutsummaryrefslogtreecommitdiff
path: root/gcc/dwarf2out.c
diff options
context:
space:
mode:
authorNathan Froyd <froydnj@codesourcery.com>2010-12-22 19:45:58 +0000
committerNathan Froyd <froydnj@gcc.gnu.org>2010-12-22 19:45:58 +0000
commitf4da8dce7a9023cf147d1a7537c0b75fe41fecbf (patch)
tree0e435cd3933ac64da92933bc369a098bc84b208d /gcc/dwarf2out.c
parent7d127f5921df15abb3d4bdbc3f71f4784c641207 (diff)
downloadgcc-f4da8dce7a9023cf147d1a7537c0b75fe41fecbf.zip
gcc-f4da8dce7a9023cf147d1a7537c0b75fe41fecbf.tar.gz
gcc-f4da8dce7a9023cf147d1a7537c0b75fe41fecbf.tar.bz2
c-aux-info.c (gen_formal_list_for_type): Use prototype_p.
gcc/ * c-aux-info.c (gen_formal_list_for_type): Use prototype_p. * c-decl.c (diagnose_arglist_conflict): Likewise. (diagnose_mismatched_decls, merge_decls): Likewise. (c_builtin_function, c_builtin_function_ext_scope): Likewise. (start_decl, start_function): Likewise. * c-tree.h (C_DECL_ISNT_PROTOTYPED): Likewise. * config/ia64/ia64.h (INIT_CUMULATIVE_ARGS): Likewise. * config/mep/mep.c (mep_validate_interrupt): Likewise. * config/pa/pa.h (INIT_CUMULATIVE_ARGS): Likewise. * config/rs6000/rs6000.c (init_cumulative_args): Likewise. * config/sh/sh.c (sh_init_cumulative_args): Likewise. * config/sparc/sparc.c (init_cumulative_args): Likewise. * dwarf2out.c (add_prototyped_attribute): Likewise. (gen_subprogram_die): Likewise. * ipa-type-escape.c (check_function_parameter_and_return_types): Likewise. (check_call): Likewise. * tree-ssa.c (useless_type_conversion_p): Likewise. gcc/ada/ * gcc-interface/utils.c (handle_nonnull_attribute): Use prototype_p. (handle_sentinel_attribute): Likewise. gcc/c-family/ * c-common.c (handle_nonnull_attribute, handle_sentinel_attribute): Use prototype_p. gcc/cp/ * decl.c (decls_match, duplicate_decls): Use prototype_p. * pt.c (push_template_decl_real): Likewise. gcc/lto/ * lto-lang.c (handle_nonnull_attribute, handle_sentinel_attribute): Use prototype_p. gcc/objc/ * objc-act.c (next_sjlj_build_enter_and_setjmp): Use prototype_p. From-SVN: r168181
Diffstat (limited to 'gcc/dwarf2out.c')
-rw-r--r--gcc/dwarf2out.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
index bc21875..9fe1e9c 100644
--- a/gcc/dwarf2out.c
+++ b/gcc/dwarf2out.c
@@ -17651,7 +17651,7 @@ static inline void
add_prototyped_attribute (dw_die_ref die, tree func_type)
{
if (get_AT_unsigned (comp_unit_die (), DW_AT_language) == DW_LANG_C89
- && TYPE_ARG_TYPES (func_type) != NULL)
+ && prototype_p (func_type))
add_AT_flag (die, DW_AT_prototyped, 1);
}
@@ -18900,7 +18900,6 @@ gen_subprogram_die (tree decl, dw_die_ref context_die)
char label_id[MAX_ARTIFICIAL_LABEL_BYTES];
tree origin = decl_ultimate_origin (decl);
dw_die_ref subr_die;
- tree fn_arg_types;
tree outer_scope;
dw_die_ref old_die = lookup_decl_die (decl);
int declaration = (current_function_decl != decl
@@ -19238,8 +19237,7 @@ gen_subprogram_die (tree decl, dw_die_ref context_die)
void_type_node 2) an unprototyped function declaration (not a
definition). This just means that we have no info about the
parameters at all. */
- fn_arg_types = TYPE_ARG_TYPES (TREE_TYPE (decl));
- if (fn_arg_types != NULL)
+ if (prototype_p (TREE_TYPE (decl)))
{
/* This is the prototyped case, check for.... */
if (stdarg_p (TREE_TYPE (decl)))