Commit 2c686dfe by Ian Lance Taylor

compiler: Fix assembler names of types defined in functions.

From-SVN: r187574
parent 240f6a1d
...@@ -1003,7 +1003,7 @@ Named_object::get_id(Gogo* gogo) ...@@ -1003,7 +1003,7 @@ Named_object::get_id(Gogo* gogo)
{ {
const Named_object* in_function = this->type_value()->in_function(); const Named_object* in_function = this->type_value()->in_function();
if (in_function != NULL) if (in_function != NULL)
decl_name += '$' + in_function->name(); decl_name += '$' + Gogo::unpack_hidden_name(in_function->name());
} }
return get_identifier_from_string(decl_name); return get_identifier_from_string(decl_name);
} }
......
...@@ -1748,7 +1748,7 @@ Type::specific_type_functions(Gogo* gogo, Named_type* name, ...@@ -1748,7 +1748,7 @@ Type::specific_type_functions(Gogo* gogo, Named_type* name,
base_name = name->name(); base_name = name->name();
const Named_object* in_function = name->in_function(); const Named_object* in_function = name->in_function();
if (in_function != NULL) if (in_function != NULL)
base_name += '$' + in_function->name(); base_name += '$' + Gogo::unpack_hidden_name(in_function->name());
} }
std::string hash_name = base_name + "$hash"; std::string hash_name = base_name + "$hash";
std::string equal_name = base_name + "$equal"; std::string equal_name = base_name + "$equal";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment