[llvm-dev] Is that LLVM Language Reference Manual's bug?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[llvm-dev] Is that LLVM Language Reference Manual's bug?

Muhui Jiang via llvm-dev
Dear list,

http://www.llvm.org/docs/LangRef.html#visibility-styles says  "A
symbol with internal or private linkage must have default visibility."
 I think it should be protected visibility.

--
Best Regards,
Yu Rong Tan
_______________________________________________
LLVM Developers mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
Reply | Threaded
Open this post in threaded view
|

Re: [llvm-dev] Is that LLVM Language Reference Manual's bug?

Muhui Jiang via llvm-dev
On Mon, 25 Jun 2018 at 11:05, Nancy via llvm-dev
<[hidden email]> wrote:
> http://www.llvm.org/docs/LangRef.html#visibility-styles says  "A
> symbol with internal or private linkage must have default visibility."
>  I think it should be protected visibility.

The statement in the LangRef is the one that's enforced. I can see why
it looks like "protected" is the closest to reality but I think what's
actually happening is that "internal" and "private" linkage make the
visibility specifiers meaningless, and what you get when you don't
specify one happens to be "default".

Since it'll never be printed anyway, there's not really any reason to
invent something like "internal_default" just to make the
documentation neater.

Cheers.

Tim.
_______________________________________________
LLVM Developers mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
Reply | Threaded
Open this post in threaded view
|

Re: [llvm-dev] Is that LLVM Language Reference Manual's bug?

Muhui Jiang via llvm-dev
> <[hidden email]> wrote:
>> http://www.llvm.org/docs/LangRef.html#visibility-styles says  "A
>> symbol with internal or private linkage must have default visibility."
>>  I think it should be protected visibility.
>
> The statement in the LangRef is the one that's enforced. I can see why
> it looks like "protected" is the closest to reality but I think what's
> actually happening is that "internal" and "private" linkage make the
> visibility specifiers meaningless, and what you get when you don't
> specify one happens to be "default".
>
> Since it'll never be printed anyway, there's not really any reason to
> invent something like "internal_default" just to make the
> documentation neater.

Thank you very much for your info ~
_______________________________________________
LLVM Developers mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev