PR c++/11961:

* dwarf2read.c (new_symbol_full) <DW_TAG_template_type_param>:
	Don't set TYPE_NAME on the type.
This commit is contained in:
Tom Tromey 2010-08-31 20:03:20 +00:00
parent 8bbed40521
commit 6438229074
2 changed files with 20 additions and 13 deletions

View File

@ -1,3 +1,9 @@
2010-08-31 Tom Tromey <tromey@redhat.com>
PR c++/11961:
* dwarf2read.c (new_symbol_full) <DW_TAG_template_type_param>:
Don't set TYPE_NAME on the type.
2010-08-31 Michael Snyder <msnyder@msnyder-server.eng.vmware.com> 2010-08-31 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
* infrun.c (set_exec_direction_func): Error out if target does not * infrun.c (set_exec_direction_func): Error out if target does not

View File

@ -10729,22 +10729,23 @@ new_symbol_full (struct die_info *die, struct type *type, struct dwarf2_cu *cu,
&& (cu->language == language_cplus && (cu->language == language_cplus
|| cu->language == language_java) || cu->language == language_java)
? &global_symbols : cu->list_in_scope); ? &global_symbols : cu->list_in_scope);
}
/* The semantics of C++ state that "struct foo { ... }" also /* The semantics of C++ state that "struct foo {
defines a typedef for "foo". A Java class declaration also ... }" also defines a typedef for "foo". A Java
defines a typedef for the class. */ class declaration also defines a typedef for the
class. */
if (cu->language == language_cplus if (cu->language == language_cplus
|| cu->language == language_java || cu->language == language_java
|| cu->language == language_ada) || cu->language == language_ada)
{ {
/* The symbol's name is already allocated along with /* The symbol's name is already allocated along
this objfile, so we don't need to duplicate it for with this objfile, so we don't need to
the type. */ duplicate it for the type. */
if (TYPE_NAME (SYMBOL_TYPE (sym)) == 0) if (TYPE_NAME (SYMBOL_TYPE (sym)) == 0)
TYPE_NAME (SYMBOL_TYPE (sym)) = SYMBOL_SEARCH_NAME (sym); TYPE_NAME (SYMBOL_TYPE (sym)) = SYMBOL_SEARCH_NAME (sym);
} }
} }
}
break; break;
case DW_TAG_typedef: case DW_TAG_typedef:
SYMBOL_CLASS (sym) = LOC_TYPEDEF; SYMBOL_CLASS (sym) = LOC_TYPEDEF;