Commit 7653f273 by Dodji Seketeli Committed by Dodji Seketeli

DWARF for Template parm pack is a gnu extension.

include/ChangeLog:
	* dwarf2.h (enum dwarf_tag): Rename DW_TAG_template_parameter_pack and
	DW_TAG_formal_parameter_pack into DW_TAG_GNU_template_parameter_pack
	and DW_TAG_formal_parameter_pack until DWARF 5 is out.

gcc/ChangeLog:
	* dwarf2out.c (dwarf_tag_name, gen_generic_params_dies,
	generic_parameter_die, template_parameter_pack_die,
	gen_formal_parameter_die, gen_subprogram_die): Adjust after renaming
	DW_TAG_formal_parameter_pack and DW_TAG_template_parameter_pack into
	DW_TAG_GNU_formal_parameter_pack and DW_TAG_GNU_template_parameter_pack.

gcc/testsuite/ChangeLog:
	* g++.dg/debug/dwarf2/template-func-params-4.C: Adjust after renaming
	DW_TAG_template_parameter_pack and DW_TAG_formal_parameter_pack
	into DW_TAG_GNU_template_parameter_pack and
	DW_TAG_GNU_formal_parameter_pack.
	* g++.dg/debug/dwarf2/template-params-4.C: Likewise.
	* g++.dg/debug/dwarf2/template-func-params-7.C: Likewise.

From-SVN: r152188
parent 072c87d1
2009-09-25 Richard Henderson <rth@redhat.com> 2009-09-25 Dodji Seketeli <dodji@redhat.com>
PR middle-end/41469 * dwarf2out.c (dwarf_tag_name, gen_generic_params_dies,
* tree-eh.c (lower_resx): Resolve RESX with no source region to generic_parameter_die, template_parameter_pack_die,
__builtin_trap. gen_formal_parameter_die, gen_subprogram_die): Adjust after renaming
(gate_lower_resx): New. DW_TAG_formal_parameter_pack and DW_TAG_template_parameter_pack into
(gate_lower_eh_dispatch): Rename from gate_lower_ehcontrol. DW_TAG_GNU_formal_parameter_pack and DW_TAG_GNU_template_parameter_pack.
2009-09-25 Anatoly Sokolov <aesok@post.ru> 2009-09-25 Anatoly Sokolov <aesok@post.ru>
......
...@@ -6340,10 +6340,10 @@ dwarf_tag_name (unsigned int tag) ...@@ -6340,10 +6340,10 @@ dwarf_tag_name (unsigned int tag)
return "DW_TAG_condition"; return "DW_TAG_condition";
case DW_TAG_shared_type: case DW_TAG_shared_type:
return "DW_TAG_shared_type"; return "DW_TAG_shared_type";
case DW_TAG_template_parameter_pack: case DW_TAG_GNU_template_parameter_pack:
return "DW_TAG_template_parameter_pack"; return "DW_TAG_GNU_template_parameter_pack";
case DW_TAG_formal_parameter_pack: case DW_TAG_GNU_formal_parameter_pack:
return "DW_TAG_formal_parameter_pack"; return "DW_TAG_GNU_formal_parameter_pack";
case DW_TAG_MIPS_loop: case DW_TAG_MIPS_loop:
return "DW_TAG_MIPS_loop"; return "DW_TAG_MIPS_loop";
case DW_TAG_format_label: case DW_TAG_format_label:
...@@ -10560,7 +10560,7 @@ gen_generic_params_dies (tree t) ...@@ -10560,7 +10560,7 @@ gen_generic_params_dies (tree t)
if (parm && TREE_VALUE (parm) && arg) if (parm && TREE_VALUE (parm) && arg)
{ {
/* If PARM represents a template parameter pack, /* If PARM represents a template parameter pack,
emit a DW_TAG_template_parameter_pack DIE, followed emit a DW_TAG_GNU_template_parameter_pack DIE, followed
by DW_TAG_template_*_parameter DIEs for the argument by DW_TAG_template_*_parameter DIEs for the argument
pack elements of ARG. Note that ARG would then be pack elements of ARG. Note that ARG would then be
an argument pack. */ an argument pack. */
...@@ -10675,7 +10675,7 @@ generic_parameter_die (tree parm, tree arg, ...@@ -10675,7 +10675,7 @@ generic_parameter_die (tree parm, tree arg,
return tmpl_die; return tmpl_die;
} }
/* Generate and return a DW_TAG_template_parameter_pack DIE representing. /* Generate and return a DW_TAG_GNU_template_parameter_pack DIE representing.
PARM_PACK must be a template parameter pack. The returned DIE PARM_PACK must be a template parameter pack. The returned DIE
will be child DIE of PARENT_DIE. */ will be child DIE of PARENT_DIE. */
...@@ -10691,7 +10691,7 @@ template_parameter_pack_die (tree parm_pack, ...@@ -10691,7 +10691,7 @@ template_parameter_pack_die (tree parm_pack,
&& parm_pack && parm_pack
&& DECL_NAME (parm_pack)); && DECL_NAME (parm_pack));
die = new_die (DW_TAG_template_parameter_pack, parent_die, parm_pack); die = new_die (DW_TAG_GNU_template_parameter_pack, parent_die, parm_pack);
add_AT_string (die, DW_AT_name, IDENTIFIER_POINTER (DECL_NAME (parm_pack))); add_AT_string (die, DW_AT_name, IDENTIFIER_POINTER (DECL_NAME (parm_pack)));
for (j = 0; j < TREE_VEC_LENGTH (parm_pack_args); j++) for (j = 0; j < TREE_VEC_LENGTH (parm_pack_args); j++)
...@@ -15425,7 +15425,7 @@ gen_formal_parameter_die (tree node, tree origin, bool emit_name_p, ...@@ -15425,7 +15425,7 @@ gen_formal_parameter_die (tree node, tree origin, bool emit_name_p,
return parm_die; return parm_die;
} }
/* Generate and return a DW_TAG_formal_parameter_pack. Also generate /* Generate and return a DW_TAG_GNU_formal_parameter_pack. Also generate
children DW_TAG_formal_parameter DIEs representing the arguments of the children DW_TAG_formal_parameter DIEs representing the arguments of the
parameter pack. parameter pack.
...@@ -15450,7 +15450,7 @@ gen_formal_parameter_pack_die (tree parm_pack, ...@@ -15450,7 +15450,7 @@ gen_formal_parameter_pack_die (tree parm_pack,
&& DECL_NAME (parm_pack) && DECL_NAME (parm_pack)
&& subr_die); && subr_die);
parm_pack_die = new_die (DW_TAG_formal_parameter_pack, subr_die, parm_pack); parm_pack_die = new_die (DW_TAG_GNU_formal_parameter_pack, subr_die, parm_pack);
add_AT_string (parm_pack_die, DW_AT_name, add_AT_string (parm_pack_die, DW_AT_name,
IDENTIFIER_POINTER (DECL_NAME (parm_pack))); IDENTIFIER_POINTER (DECL_NAME (parm_pack)));
...@@ -15988,10 +15988,10 @@ gen_subprogram_die (tree decl, dw_die_ref context_die) ...@@ -15988,10 +15988,10 @@ gen_subprogram_die (tree decl, dw_die_ref context_die)
DECL itself. This is useful because we want to emit specific DIEs for DECL itself. This is useful because we want to emit specific DIEs for
function parameter packs and those are declared as part of the function parameter packs and those are declared as part of the
generic function declaration. In that particular case, generic function declaration. In that particular case,
the parameter pack yields a DW_TAG_formal_parameter_pack DIE. the parameter pack yields a DW_TAG_GNU_formal_parameter_pack DIE.
That DIE has children DIEs representing the set of arguments That DIE has children DIEs representing the set of arguments
of the pack. Note that the set of pack arguments can be empty. of the pack. Note that the set of pack arguments can be empty.
In that case, the DW_TAG_formal_parameter_pack DIE will not have any In that case, the DW_TAG_GNU_formal_parameter_pack DIE will not have any
children DIE. children DIE.
Otherwise, we just consider the parameters of DECL. */ Otherwise, we just consider the parameters of DECL. */
......
2009-09-25 Dodji Seketeli <dodji@redhat.com>
* g++.dg/debug/dwarf2/template-func-params-4.C: Adjust after renaming
DW_TAG_template_parameter_pack and DW_TAG_formal_parameter_pack
into DW_TAG_GNU_template_parameter_pack and
DW_TAG_GNU_formal_parameter_pack.
* g++.dg/debug/dwarf2/template-params-4.C: Likewise.
* g++.dg/debug/dwarf2/template-func-params-7.C: Likewise.
2009-09-25 Nathan Froyd <froydnj@codesourcery.com> 2009-09-25 Nathan Froyd <froydnj@codesourcery.com>
* gcc.dg/vect/vect.exp: Append extra parameters as separate * gcc.dg/vect/vect.exp: Append extra parameters as separate
......
...@@ -6,10 +6,10 @@ ...@@ -6,10 +6,10 @@
// count<char, long> and count<long>. In practice, only // count<char, long> and count<long>. In practice, only
// count<int, char, long> is emitted, thanks to constant folding. // count<int, char, long> is emitted, thanks to constant folding.
// So in theory, each of the 3 instances of count yields a // So in theory, each of the 3 instances of count yields a
// DW_TAG_tempalate_parameter_pack DIE, but in practise, there is only one // DW_TAG_GNU_template_parameter_pack DIE, but in practise, there is only one
// DW_TAG_template_parameter_pack as there is only count<int, char, long> // DW_TAG_GNU_template_parameter_pack as there is only count<int, char, long>
// is emitted. // is emitted.
// { dg-final { scan-assembler-times "DIE \\(0x.*?\\) DW_TAG_template_parameter_pack" 1} } // { dg-final { scan-assembler-times "DIE \\(0x.*?\\) DW_TAG_GNU_template_parameter_pack" 1} }
// { dg-final { scan-assembler-times "DIE \\(0x.*?\\) DW_TAG_template_type_param" 3} } // { dg-final { scan-assembler-times "DIE \\(0x.*?\\) DW_TAG_template_type_param" 3} }
......
...@@ -17,9 +17,9 @@ ...@@ -17,9 +17,9 @@
// printf<int, char, int> and printf<char, int> have a pack expansion as // printf<int, char, int> and printf<char, int> have a pack expansion as
// function parameters. There should then be 3 // function parameters. There should then be 3
// DW_TAG_template_parameter_pack and 3 DW_TAG_formal_parameter_pack DIEs // DW_TAG_GNU_template_parameter_pack and 3 DW_TAG_GNU_formal_parameter_pack DIEs
// { dg-final {scan-assembler-times "DIE \\(0x.*?\\) DW_TAG_template_parameter_pack" 3 } } // { dg-final {scan-assembler-times "DIE \\(0x.*?\\) DW_TAG_GNU_template_parameter_pack" 3 } }
// { dg-final {scan-assembler-times "DIE \\(0x.*?\\) DW_TAG_formal_parameter_pack" 3 } } // { dg-final {scan-assembler-times "DIE \\(0x.*?\\) DW_TAG_GNU_formal_parameter_pack" 3 } }
// These 3 function template instantiations has a total of 3 template // These 3 function template instantiations has a total of 3 template
// parameters named T. // parameters named T.
// { dg_final {scan-assembler-times "\.ascii \"T.0\"\[\t \]+.*?DW_AT_name" 3 } } // { dg_final {scan-assembler-times "\.ascii \"T.0\"\[\t \]+.*?DW_AT_name" 3 } }
......
...@@ -6,10 +6,10 @@ ...@@ -6,10 +6,10 @@
// count<char, long> and count<long>. In practice, only // count<char, long> and count<long>. In practice, only
// count<int, char, long> is emitted, thanks to constant folding. // count<int, char, long> is emitted, thanks to constant folding.
// So in theory, each of the 3 instances of count yields a // So in theory, each of the 3 instances of count yields a
// DW_TAG_tempalate_parameter_pack DIE, but in practise, there is only one // DW_TAG_GNU_template_parameter_pack DIE, but in practise, there is only one
// DW_TAG_template_parameter_pack as there is only count<int, char, long> // DW_TAG_GNU_template_parameter_pack as there is only count<int, char, long>
// is emitted. // is emitted.
// { dg-final { scan-assembler-times "DIE \\(0x.*?\\) DW_TAG_template_parameter_pack" 1} } // { dg-final { scan-assembler-times "DIE \\(0x.*?\\) DW_TAG_GNU_template_parameter_pack" 1} }
// { dg-final { scan-assembler-times "DIE \\(0x.*?\\) DW_TAG_template_type_param" 3} } // { dg-final { scan-assembler-times "DIE \\(0x.*?\\) DW_TAG_template_type_param" 3} }
template <typename... Args> struct count; template <typename... Args> struct count;
......
2009-09-25 Dodji Seketeli <dodji@redhat.com>
* dwarf2.h (enum dwarf_tag): Rename DW_TAG_template_parameter_pack and
DW_TAG_formal_parameter_pack into DW_TAG_GNU_template_parameter_pack
and DW_TAG_formal_parameter_pack until DWARF 5 is out.
2009-09-25 Cary Coutant <ccoutant@google.com> 2009-09-25 Cary Coutant <ccoutant@google.com>
Add rest of new values from DWARF Version 4. Add rest of new values from DWARF Version 4.
......
...@@ -202,14 +202,6 @@ enum dwarf_tag ...@@ -202,14 +202,6 @@ enum dwarf_tag
DW_TAG_lo_user = 0x4080, DW_TAG_lo_user = 0x4080,
DW_TAG_hi_user = 0xffff, DW_TAG_hi_user = 0xffff,
/* DWARF 5? */
/* Template parameter pack extension, specified at
http://wiki.dwarfstd.org/index.php?title=C%2B%2B0x:_Variadic_templates
. */
DW_TAG_template_parameter_pack = 0x43,
DW_TAG_formal_parameter_pack = 0x44,
/* SGI/MIPS Extensions. */ /* SGI/MIPS Extensions. */
DW_TAG_MIPS_loop = 0x4081, DW_TAG_MIPS_loop = 0x4081,
/* HP extensions. See: ftp://ftp.hp.com/pub/lang/tools/WDB/wdb-4.0.tar.gz . */ /* HP extensions. See: ftp://ftp.hp.com/pub/lang/tools/WDB/wdb-4.0.tar.gz . */
...@@ -223,6 +215,13 @@ enum dwarf_tag ...@@ -223,6 +215,13 @@ enum dwarf_tag
/* Template template parameter. /* Template template parameter.
See http://gcc.gnu.org/wiki/TemplateParmsDwarf . */ See http://gcc.gnu.org/wiki/TemplateParmsDwarf . */
DW_TAG_GNU_template_template_param = 0x4106, DW_TAG_GNU_template_template_param = 0x4106,
/* Template parameter pack extension, specified at
http://wiki.dwarfstd.org/index.php?title=C%2B%2B0x:_Variadic_templates
The values of these two TAGS are in the DW_TAG_GNU_* space until the tags
are properly part of DWARF 5. */
DW_TAG_GNU_template_parameter_pack = 0x4107,
DW_TAG_GNU_formal_parameter_pack = 0x4108,
/* Extensions for UPC. See: http://upc.gwu.edu/~upc. */ /* Extensions for UPC. See: http://upc.gwu.edu/~upc. */
DW_TAG_upc_shared_type = 0x8765, DW_TAG_upc_shared_type = 0x8765,
DW_TAG_upc_strict_type = 0x8766, DW_TAG_upc_strict_type = 0x8766,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment