diff options
author | dodji <dodji@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-09-22 20:20:03 +0000 |
---|---|---|
committer | dodji <dodji@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-09-22 20:20:03 +0000 |
commit | 5d1e31fa0e98d2b15a1ceba3f238699b69392a09 (patch) | |
tree | 395254d28bc788cef4cbaf2e87a895cb34b3ee35 /gcc/langhooks-def.h | |
parent | c34a092122a7cf3f644084534d0ab4f960d51cec (diff) | |
download | gcc-5d1e31fa0e98d2b15a1ceba3f238699b69392a09.tar.gz |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@152043 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/langhooks-def.h')
-rw-r--r-- | gcc/langhooks-def.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/langhooks-def.h b/gcc/langhooks-def.h index dc4fdeef02f..fa078adaa9a 100644 --- a/gcc/langhooks-def.h +++ b/gcc/langhooks-def.h @@ -157,8 +157,12 @@ extern tree lhd_make_node (enum tree_code); #define LANG_HOOKS_GENERIC_TYPE_P hook_bool_const_tree_false #define LANG_HOOKS_GET_INNERMOST_GENERIC_PARMS hook_tree_const_tree_null #define LANG_HOOKS_GET_INNERMOST_GENERIC_ARGS hook_tree_const_tree_null +#define LANG_HOOKS_FUNCTION_PARAMETER_PACK_P hook_bool_const_tree_false #define LANG_HOOKS_GET_ARGUMENT_PACK_ELEMS hook_tree_const_tree_null #define LANG_HOOKS_GENERIC_GENERIC_PARAMETER_DECL_P hook_bool_const_tree_false +#define LANG_HOOKS_FUNCTION_PARM_EXPANDED_FROM_PACK_P \ + hook_bool_tree_tree_false +#define LANG_HOOKS_GET_GENERIC_FUNCTION_DECL hook_tree_const_tree_null #define LANG_HOOKS_TYPE_PROMOTES_TO lhd_type_promotes_to #define LANG_HOOKS_REGISTER_BUILTIN_TYPE lhd_register_builtin_type #define LANG_HOOKS_TYPE_MAX_SIZE lhd_return_null_const_tree @@ -214,6 +218,8 @@ extern tree lhd_make_node (enum tree_code); LANG_HOOKS_GETDECLS, \ LANG_HOOKS_FUNCTION_DECL_EXPLICIT_P, \ LANG_HOOKS_GENERIC_GENERIC_PARAMETER_DECL_P, \ + LANG_HOOKS_FUNCTION_PARM_EXPANDED_FROM_PACK_P, \ + LANG_HOOKS_GET_GENERIC_FUNCTION_DECL, \ LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL, \ LANG_HOOKS_WRITE_GLOBALS, \ LANG_HOOKS_DECL_OK_FOR_SIBCALL, \ @@ -268,6 +274,7 @@ extern tree lhd_make_node (enum tree_code); LANG_HOOKS_FOR_TYPES_INITIALIZER, \ LANG_HOOKS_GET_INNERMOST_GENERIC_PARMS, \ LANG_HOOKS_GET_INNERMOST_GENERIC_ARGS, \ + LANG_HOOKS_FUNCTION_PARAMETER_PACK_P, \ LANG_HOOKS_GIMPLIFY_EXPR, \ LANG_HOOKS_FOLD_OBJ_TYPE_REF, \ LANG_HOOKS_BUILTIN_FUNCTION, \ |