]> granicus.if.org Git - clang/commit
[Driver] Alias -fvisibility=internal to -fvisibility=hidden
authorReid Kleckner <rnk@google.com>
Wed, 21 Oct 2015 22:01:02 +0000 (22:01 +0000)
committerReid Kleckner <rnk@google.com>
Wed, 21 Oct 2015 22:01:02 +0000 (22:01 +0000)
commitab6807ac8f0aa1a2c9520c88022468a715c010bd
treec6f01f9c49553b34144ca5befcfa857e5a719875
parent20a4fe392e8dfaaba1dd1a2be7ddd5dbc76190e3
[Driver] Alias -fvisibility=internal to -fvisibility=hidden

The ELF symbol visibilities are:
- internal: Not visibile across DSOs, cannot pass address across DSOs
- hidden: Not visibile across DSOs, can be called indirectly
- default: Usually visible across DSOs, possibly interposable
- protected: Visible across DSOs, not interposable

LLVM only supports the latter 3 visibilities. Internal visibility is in
theory useful, as it allows you to assume that the caller is maintaining
a PIC register for you in %ebx, or in some other pre-arranged location.
As far as LLVM is concerned, this isn't worth the trouble. Using hidden
visibility is always correct, so we can just do that.

Resolves PR9183.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@250954 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Frontend/CompilerInvocation.cpp
test/CodeGenCXX/visibility.cpp