compiler: suppress type descriptor generation for aliases

Change Named_object::get_backend to ignore aliases when creating type
descriptors for types, to be consistent with
Type::needs_specific_type_functions and the Specific_type_functions
traversal class. For example, when compiling a package that creates an
alias to an an externally defined type, e.g.

   import "foo"
   type MyFoo = foo.Foo

it makes sense to skip the alias (not try to generate type specific
functions for it) and let the normal mechanisms take care of the alias
target, depending on whether the target is defined locally or defined

Testcase for this problen can be found in CL 193261.

Fixes golang/go#33866.

Change-Id: I307318c9c5f384abfaeae6b68bbbb8cdf7175068
Reviewed-by: Ian Lance Taylor <>
1 file changed