Remove language check from dwarf2_compute_name

dwarf2_compute_name has a redundant check of the CU's language -- this
is also checked in dwarf2_canonicalize_name.  Removing this slightly
simplifies a future patch.

Reviewed-by: Andrew Burgess <aburgess@redhat.com>
This commit is contained in:
Tom Tromey 2022-11-04 14:08:13 -06:00
parent 00a5867df7
commit 5f0a4fb85e

View file

@ -8927,7 +8927,6 @@ dwarf2_compute_name (const char *name,
if (die_needs_namespace (die, cu))
{
const char *prefix;
const char *canonical_name = NULL;
string_file buf;
@ -9093,8 +9092,7 @@ dwarf2_compute_name (const char *name,
const std::string &intermediate_name = buf.string ();
if (lang == language_cplus)
canonical_name
const char *canonical_name
= dwarf2_canonicalize_name (intermediate_name.c_str (), cu,
objfile);