aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/cp-tree.h
diff options
context:
space:
mode:
authorDodji Seketeli <dodji@redhat.com>2009-09-22 20:20:03 +0000
committerDodji Seketeli <dodji@gcc.gnu.org>2009-09-22 22:20:03 +0200
commitd40a19da1370ab4930788ede0a5c9e9171a16656 (patch)
tree395254d28bc788cef4cbaf2e87a895cb34b3ee35 /gcc/cp/cp-tree.h
parent8249770055caeb6c1a061b03f58fb6f38f06cb0c (diff)
downloadgcc-d40a19da1370ab4930788ede0a5c9e9171a16656.zip
gcc-d40a19da1370ab4930788ede0a5c9e9171a16656.tar.gz
gcc-d40a19da1370ab4930788ede0a5c9e9171a16656.tar.bz2
re PR debug/41266 (Emit DW_TAG_template_parameter_pack and DW_TAG_formal_parameter_pack)
Fix for PR debug/41266 ChangeLog: * include/dwarf2.h (enum dwarf_tag): Add DW_TAG_template_parameter_pack and DW_TAG_formal_parameter_pack. gcc/ChangeLog: * dwarf2out.c (template_parameter_pack_die, gen_formal_parameter_pack_die ): New functions. (make_ith_pack_parameter_name): Remove this function. (dwarf_tag_name): Support printing DW_TAG_template_parameter_pack and DW_TAG_formal_parameter_pack. (gen_generic_params_dies): Represent each template parameter pack by a DW_TAG_template_parameter_pack DIE. Argument pack elements are represented by usual DW_TAG_template_*_parameter DIEs that are children of the DW_TAG_template_parameter_pack element DIE. (generic_parameter_die): This doesn't deal with parameter pack names anymore. Don't generate DW_AT_name for some DIEs, e.g. children of parameter pack DIEs. (gen_formal_parameter_die): Add a flag to not emit DW_AT_name in certain cases, e.g. for pack elements. (gen_formal_types_die, gen_decl_die): Adjust usage of gen_formal_parameter_die. (gen_subprogram_die): Represent each function parameter pack by a DW_TAG_formal_parameter_pack DIE. Arguments of of the pack are represented by usual DW_TAG_formal_parameter DIEs that are children of the DW_TAG_formal_parameter_pack DIE. Remove references to ____builtin_va_alist decls as no part of the compiler uses those anymore. * langhooks.h (struct lang_hooks_for_decls): Add function_parm_expanded_from_pack_p, get_generic_function_decl and function_parameter_pack_p hooks. Fix comment for get_innermost_generic_parms hook. * langhooks-def.h (LANG_HOOKS_FUNCTION_PARAMETER_PACK_P, LANG_HOOKS_FUNCTION_PARM_EXPANDED_FROM_PACK_P ): Declare new hook macros and use them to initialize lang_hook. gcc/cp/ChangeLog: * cp-lang.c (LANG_HOOKS_FUNCTION_PARAMETER_PACK_P, LANG_HOOKS_FUNCTION_PARM_EXPANDED_FROM_PACK_P, LANG_HOOKS_GET_GENERIC_FUNCTION_DECL): Initialize these hooks for the c++ FE. * cp-tree.h (function_parameter_pack_p, get_function_template_decl, function_parameter_expanded_from_pack_p): Declare ... * pt.c (function_parameter_pack_p, get_function_template_decl, function_parameter_expanded_from_pack_p): ... new hooks. (get_template_info): Make this more robust. (template_args_variadic_p, make_ith_pack_parameter_name): Add a new line between comment and function. (get_template_argument_pack_elems): Fix comment. (tsubst_decl): Arguments of function parameter packs are not parameter packs themselves. gcc/testsuite/ChangeLog: * g++.dg/debug/dwarf2/template-func-params-4.C: Adjust. * g++.dg/debug/dwarf2/template-func-params-7.C: Likewise. * g++.dg/debug/dwarf2/template-params-4.C: Likewise. From-SVN: r152043
Diffstat (limited to 'gcc/cp/cp-tree.h')
-rw-r--r--gcc/cp/cp-tree.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h
index 816b4ca..c089bb7 100644
--- a/gcc/cp/cp-tree.h
+++ b/gcc/cp/cp-tree.h
@@ -4643,6 +4643,8 @@ extern tree instantiate_decl (tree, int, bool);
extern int comp_template_parms (const_tree, const_tree);
extern bool uses_parameter_packs (tree);
extern bool template_parameter_pack_p (const_tree);
+extern bool function_parameter_pack_p (const_tree);
+extern bool function_parameter_expanded_from_pack_p (tree, tree);
extern tree make_pack_expansion (tree);
extern bool check_for_bare_parameter_packs (tree);
extern tree get_template_info (const_tree);
@@ -4692,7 +4694,7 @@ bool template_template_parameter_p (const_tree);
extern tree get_primary_template_innermost_parameters (const_tree);
extern tree get_template_innermost_arguments (const_tree);
extern tree get_template_argument_pack_elems (const_tree);
-
+extern tree get_function_template_decl (const_tree);
/* in repo.c */
extern void init_repo (void);
extern int repo_emit_p (tree);