> On 8/25/20 8:46 PM, Jan Hubicka wrote:
> > What will happen here with protected visibility?
> 
> I forgot about it. Should it be mapped also to "local"?
> 
> +  const char *visibility = NULL;
> +  if (!TREE_PUBLIC (origin_decl))
> +    visibility = "remove";
> +  else if (DECL_VISIBILITY (origin_decl) == VISIBILITY_INTERNAL
> +          || DECL_VISIBILITY (origin_decl) == VISIBILITY_PROTECTED)
> +    visibility = "local";
> +  else if (DECL_VISIBILITY (origin_decl) == VISIBILITY_HIDDEN)
> +    visibility = "hidden";

I have no idea (depends what gas will do), you need to check if the
resulting symbol will indeed have right visibility in all of the cases.
If some of them are not possible, I suppose we could just reject the
comination.

Honza
> 
> Thanks,
> Martin

Reply via email to