OSDN Git Service

DWARF for Template parm pack is a gnu extension.
authordodji <dodji@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 25 Sep 2009 23:23:18 +0000 (23:23 +0000)
committerdodji <dodji@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 25 Sep 2009 23:23:18 +0000 (23:23 +0000)
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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@152188 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/dwarf2out.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/debug/dwarf2/template-func-params-4.C
gcc/testsuite/g++.dg/debug/dwarf2/template-func-params-7.C
gcc/testsuite/g++.dg/debug/dwarf2/template-params-4.C
include/ChangeLog
include/dwarf2.h

index 7e7367f..733d2f5 100644 (file)
@@ -1,10 +1,10 @@
-2009-09-25  Richard Henderson  <rth@redhat.com>
+2009-09-25  Dodji Seketeli  <dodji@redhat.com>
 
-       PR middle-end/41469
-       * tree-eh.c (lower_resx): Resolve RESX with no source region to
-       __builtin_trap.
-       (gate_lower_resx): New.
-       (gate_lower_eh_dispatch): Rename from gate_lower_ehcontrol.
+       * 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.
 
 2009-09-25  Anatoly Sokolov  <aesok@post.ru>
 
index 2338e29..bbb21b0 100644 (file)
@@ -6340,10 +6340,10 @@ dwarf_tag_name (unsigned int tag)
       return "DW_TAG_condition";
     case DW_TAG_shared_type:
       return "DW_TAG_shared_type";
-    case DW_TAG_template_parameter_pack:
-      return "DW_TAG_template_parameter_pack";
-    case DW_TAG_formal_parameter_pack:
-      return "DW_TAG_formal_parameter_pack";
+    case DW_TAG_GNU_template_parameter_pack:
+      return "DW_TAG_GNU_template_parameter_pack";
+    case DW_TAG_GNU_formal_parameter_pack:
+      return "DW_TAG_GNU_formal_parameter_pack";
     case DW_TAG_MIPS_loop:
       return "DW_TAG_MIPS_loop";
     case DW_TAG_format_label:
@@ -10560,7 +10560,7 @@ gen_generic_params_dies (tree t)
       if (parm && TREE_VALUE (parm) && arg)
        {
          /* 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
             pack elements of ARG. Note that ARG would then be
             an argument pack.  */
@@ -10675,7 +10675,7 @@ generic_parameter_die (tree parm, tree arg,
   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
    will be child DIE of PARENT_DIE.  */
 
@@ -10691,7 +10691,7 @@ template_parameter_pack_die (tree parm_pack,
              && 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)));
 
   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,
   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
    parameter pack.
 
@@ -15450,7 +15450,7 @@ gen_formal_parameter_pack_die  (tree parm_pack,
              && DECL_NAME (parm_pack)
              && 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,
                 IDENTIFIER_POINTER (DECL_NAME (parm_pack)));
 
@@ -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
         function parameter packs and those are declared as part of the
         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
         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.
        
         Otherwise, we just consider the parameters of DECL.  */
index 03410b9..3157ff9 100644 (file)
@@ -1,3 +1,12 @@
+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>
 
        * gcc.dg/vect/vect.exp: Append extra parameters as separate
index f75d0e6..45b0cf8 100644 (file)
@@ -6,10 +6,10 @@
 // count<char, long> and count<long>. In practice, only
 // count<int, char, long> is emitted, thanks to constant folding.
 // 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_template_parameter_pack as there is only count<int, char, long>
+// DW_TAG_GNU_template_parameter_pack DIE, but in practise, there is only one
+// DW_TAG_GNU_template_parameter_pack as there is only count<int, char, long>
 // 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} }
 
 
index 8a883f8..a19217c 100644 (file)
@@ -17,9 +17,9 @@
 
 // printf<int, char, int> and printf<char, int> have a pack expansion as
 // function parameters. There should then be 3
-// DW_TAG_template_parameter_pack and 3 DW_TAG_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_formal_parameter_pack" 3 } }
+// DW_TAG_GNU_template_parameter_pack and 3 DW_TAG_GNU_formal_parameter_pack DIEs
+// { dg-final {scan-assembler-times "DIE \\(0x.*?\\) DW_TAG_GNU_template_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
 // parameters named T.
 // { dg_final {scan-assembler-times "\.ascii \"T.0\"\[\t \]+.*?DW_AT_name" 3 } }
index e83ef61..09e85cb 100644 (file)
@@ -6,10 +6,10 @@
 // count<char, long> and count<long>. In practice, only
 // count<int, char, long> is emitted, thanks to constant folding.
 // 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_template_parameter_pack as there is only count<int, char, long>
+// DW_TAG_GNU_template_parameter_pack DIE, but in practise, there is only one
+// DW_TAG_GNU_template_parameter_pack as there is only count<int, char, long>
 // 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} }
 
 template <typename... Args> struct count;
index b1158a2..f99325e 100644 (file)
@@ -1,3 +1,9 @@
+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>
 
        Add rest of new values from DWARF Version 4.
index 4aa10d5..385ab22 100644 (file)
@@ -202,14 +202,6 @@ enum dwarf_tag
     DW_TAG_lo_user = 0x4080,
     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.  */
     DW_TAG_MIPS_loop = 0x4081,
     /* HP extensions.  See: ftp://ftp.hp.com/pub/lang/tools/WDB/wdb-4.0.tar.gz .  */
@@ -223,6 +215,13 @@ enum dwarf_tag
     /* Template template parameter.
        See http://gcc.gnu.org/wiki/TemplateParmsDwarf .  */
     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.  */
     DW_TAG_upc_shared_type = 0x8765,
     DW_TAG_upc_strict_type = 0x8766,