Add template instantiations to the announce_function stream.
authorJason Merrill <jason@redhat.com>
Mon, 7 Nov 2016 19:35:13 +0000 (14:35 -0500)
committerJason Merrill <jason@gcc.gnu.org>
Mon, 7 Nov 2016 19:35:13 +0000 (14:35 -0500)
* pt.c (push_tinst_level_loc): Add template instantiations to the
announce_function stream.

From-SVN: r241928

gcc/cp/ChangeLog
gcc/cp/pt.c

index e567fefd6275496ecaed16a0b5d447ffd947e891..6f063e7534aff0a3dd34dce7ea6a9249dad82b25 100644 (file)
@@ -1,3 +1,8 @@
+2016-11-07  Jason Merrill  <jason@redhat.com>
+
+       * pt.c (push_tinst_level_loc): Add template instantiations to the
+       announce_function stream.
+
 2016-11-04  Paolo Carlini  <paolo.carlini@oracle.com>
 
        PR c++/67980
index c8d4a066c5df52e65d7cd03a104c21daab4f3a5f..f910d40055f7918bea1398e7bf0e258e209d04ba 100644 (file)
@@ -9170,6 +9170,13 @@ push_tinst_level_loc (tree d, location_t loc)
   if (limit_bad_template_recursion (d))
     return false;
 
+  /* When not -quiet, dump template instantiations other than functions, since
+     announce_function will take care of those.  */
+  if (!quiet_flag
+      && TREE_CODE (d) != TREE_LIST
+      && TREE_CODE (d) != FUNCTION_DECL)
+    fprintf (stderr, " %s", decl_as_string (d, TFF_DECL_SPECIFIERS));
+
   new_level = ggc_alloc<tinst_level> ();
   new_level->decl = d;
   new_level->locus = loc;