diff options
author | John McCall <rjmccall@apple.com> | 2012-01-29 01:20:30 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2012-01-29 01:20:30 +0000 |
commit | 4188760f6bb20f91c6883dffd89204419f852dee (patch) | |
tree | 75f3d71f39ec6a83537a33904c5abfa8a7115133 /lib/Basic/Targets.cpp | |
parent | de2fdc249e9c04757a7aaec029b231f4d7e6dbd7 (diff) |
Complain about attempts to use 'protected' visibility on targets
like Darwin that don't support it. We should also complain about
invalid -fvisibility=protected, but that information doesn't seem
to exist at the most appropriate time, so I've left a FIXME behind.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149186 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Basic/Targets.cpp')
-rw-r--r-- | lib/Basic/Targets.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/Basic/Targets.cpp b/lib/Basic/Targets.cpp index 5cdb36f16b..5dc63e79cf 100644 --- a/lib/Basic/Targets.cpp +++ b/lib/Basic/Targets.cpp @@ -218,6 +218,12 @@ public: return "__TEXT,__StaticInit,regular,pure_instructions"; } + /// Darwin does not support protected visibility. Darwin's "default" + /// is very similar to ELF's "protected"; Darwin requires a "weak" + /// attribute on declarations that can be dynamically replaced. + virtual bool hasProtectedVisibility() const { + return false; + } }; |