aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorReid Kleckner <rnk@google.com>2015-10-21 22:01:02 +0000
committerReid Kleckner <rnk@google.com>2015-10-21 22:01:02 +0000
commit7737bd9f9fb5d9cfd5717f36791036fa08d57b95 (patch)
treebcf0b1cb3ad2bcee7078c277a068d354cb93b2db /clang/lib/Frontend/CompilerInvocation.cpp
parent9dfde98d272d1b178eb3c99f8fb758cc3e5a92b5 (diff)
downloadllvm-7737bd9f9fb5d9cfd5717f36791036fa08d57b95.zip
llvm-7737bd9f9fb5d9cfd5717f36791036fa08d57b95.tar.gz
llvm-7737bd9f9fb5d9cfd5717f36791036fa08d57b95.tar.bz2
[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. llvm-svn: 250954
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
-rw-r--r--clang/lib/Frontend/CompilerInvocation.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp
index 6e234112..7cece2b 100644
--- a/clang/lib/Frontend/CompilerInvocation.cpp
+++ b/clang/lib/Frontend/CompilerInvocation.cpp
@@ -1296,7 +1296,7 @@ static Visibility parseVisibility(Arg *arg, ArgList &args,
StringRef value = arg->getValue();
if (value == "default") {
return DefaultVisibility;
- } else if (value == "hidden") {
+ } else if (value == "hidden" || value == "internal") {
return HiddenVisibility;
} else if (value == "protected") {
// FIXME: diagnose if target does not support protected visibility