diff options
author | Patrick Palka <ppalka@redhat.com> | 2023-09-19 14:38:10 -0400 |
---|---|---|
committer | Patrick Palka <ppalka@redhat.com> | 2023-09-19 14:38:10 -0400 |
commit | b9912332c5b6fc9433ee11f5488acad117868888 (patch) | |
tree | c3c35a9b8e1c534d84a292245f38938f09723205 | |
parent | 58ab38213b979811d314f68e3f455c28a1d44140 (diff) | |
download | gcc-b9912332c5b6fc9433ee11f5488acad117868888.zip gcc-b9912332c5b6fc9433ee11f5488acad117868888.tar.gz gcc-b9912332c5b6fc9433ee11f5488acad117868888.tar.bz2 |
c++: fix cxx_print_type's template-info dumping
Unlike DECL_TEMPLATE_INFO which is stored in DECL_LANG_SPECIFIC,
TYPE_TEMPLATE_INFO isn't stored in TYPE_LANG_SPECIFIC, so we don't
need to check for both in cxx_print_type. This fixes dumping the
template-info of ENUMERAL_TYPE and BOUND_TEMPLATE_TEMPLATE_PARM,
which seem to never have TYPE_LANG_SPECIFIC.
gcc/cp/ChangeLog:
* ptree.cc (cxx_print_type): Remove TYPE_LANG_SPECIFIC
test guarding TYPE_TEMPLATE_INFO.
-rw-r--r-- | gcc/cp/ptree.cc | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/gcc/cp/ptree.cc b/gcc/cp/ptree.cc index b400148..32c5b52 100644 --- a/gcc/cp/ptree.cc +++ b/gcc/cp/ptree.cc @@ -141,9 +141,8 @@ cxx_print_decl (FILE *file, tree node, int indent) void cxx_print_type (FILE *file, tree node, int indent) { - if (TYPE_LANG_SPECIFIC (node) - && TYPE_TEMPLATE_INFO (node)) - print_node (file, "template-info", TYPE_TEMPLATE_INFO (node), indent + 4); + if (tree ti = TYPE_TEMPLATE_INFO (node)) + print_node (file, "template-info", ti, indent + 4); switch (TREE_CODE (node)) { |