go/names.cc
std::string
Gogo::function_asm_name(const std::string& go_name, const Package* package,
			const Type* rtype)
{
  std::string ret;
  if (rtype != NULL)
    ret = rtype->deref()->mangled_name(this);
  else if (package == NULL)
    ret = this->pkgpath_symbol();
  else
    ret = package->pkgpath_symbol();
  ret.push_back('.');
  // Check for special names that will break if we use
  // Gogo::unpack_hidden_name.
  if (Gogo::is_special_name(go_name))
    ret.append(go_name);
  else
    ret.append(Gogo::unpack_hidden_name(go_name));
  return go_encode_id(ret);
}
// Return the assembler name to use for an exported function, a
// method, or a function/method declaration.  This is not called if
// the function has been given an explicit name via a magic //extern
// or //go:linkname comment.  GO_NAME is the name that appears in the
// Go code.  PACKAGE is the package where the function is defined, and
// is NULL for the package being compiled.  For a method, RTYPE is
// the method's receiver type; for a function, RTYPE is NULL.
Return the assembler name to use for an exported function, a
method, or a function/method declaration.  This is not called if
the function has been given an explicit name via a magic //extern
or //go:linkname comment.  GO_NAME is the name that appears in the
Go code.  PACKAGE is the package where the function is defined, and
is NULL for the package being compiled.  For a method, RTYPE is
the method's receiver type; for a function, RTYPE is NULL.
Return the assembler name to use for an exported function a method or a function / method declaration . This is not called if the function has been given an explicit name via a magic // extern or // go : linkname comment . GO_NAME is the name that appears in the Go code . PACKAGE is the package where the function is defined and is NULL for the package being compiled . For a method RTYPE is the method ' s receiver type ; for a function RTYPE is NULL .
std::string
Gogo::function_asm_name(const std::string& go_name, const Package* package,
			const Type* rtype)
{
  std::string ret;
  if (rtype != NULL)
    ret = rtype->deref()->mangled_name(this);
  else if (package == NULL)
    ret = this->pkgpath_symbol();
  else
    ret = package->pkgpath_symbol();
  ret.push_back('.');
  if (Gogo::is_special_name(go_name))
    ret.append(go_name);
  else
    ret.append(Gogo::unpack_hidden_name(go_name));
  return go_encode_id(ret);
}
std :: string Gogo :: function_asm_name ( const std :: string & go_name , const Package * package , const Type * rtype ) { std :: string ret ; if ( rtype != NULL ) ret = rtype -> deref ( ) -> mangled_name ( this ) ; else if ( package == NULL ) ret = this -> pkgpath_symbol ( ) ; else ret = package -> pkgpath_symbol ( ) ; ret . push_back ( ' ' ) ; if ( Gogo :: is_special_name ( go_name ) ) ret . append ( go_name ) ; else ret . append ( Gogo :: unpack_hidden_name ( go_name ) ) ; return go_encode_id ( ret ) ; }
Return the assembler name to use for an exported function, a
method, or a function/method declaration.
Return the assembler name to use for an exported function a method or a function / method declaration .
// Check for special names that will break if we use // Gogo::unpack_hidden_name.