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 | eed64c77d27f0b442346c35aa5cadb774ae193d4 (patch) | |
tree | 0e384ca3b92abc799cb07117ed388030ccfeacb6 /clang/lib/Basic | |
parent | 1b3167edec7b2c34645324f4dbce5b0d9c2afcb0 (diff) | |
download | bcm5719-llvm-eed64c77d27f0b442346c35aa5cadb774ae193d4.tar.gz bcm5719-llvm-eed64c77d27f0b442346c35aa5cadb774ae193d4.zip |
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.
llvm-svn: 149186
Diffstat (limited to 'clang/lib/Basic')
-rw-r--r-- | clang/lib/Basic/Targets.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/lib/Basic/Targets.cpp b/clang/lib/Basic/Targets.cpp index 5cdb36f16b1..5dc63e79cf8 100644 --- a/clang/lib/Basic/Targets.cpp +++ b/clang/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; + } }; |