mirror of https://github.com/microsoft/clang.git
[Availability] Don't make an availability attribute imply default visibility on macOS
Fixes PR33796, rdar://33655115 Differential revision: https://reviews.llvm.org/D36191 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@310382 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
1bc8e95f27
commit
ef7226a076
|
@ -94,6 +94,9 @@ Clang now supports the ...
|
|||
Attribute Changes in Clang
|
||||
--------------------------
|
||||
|
||||
- The presence of __attribute__((availability(...))) on a declaration no longer
|
||||
implies default visibility for that declaration on macOS.
|
||||
|
||||
- ...
|
||||
|
||||
Windows Support
|
||||
|
|
|
@ -216,14 +216,6 @@ static Optional<Visibility> getVisibilityOf(const NamedDecl *D,
|
|||
return getVisibilityFromAttr(A);
|
||||
}
|
||||
|
||||
// If we're on Mac OS X, an 'availability' for Mac OS X attribute
|
||||
// implies visibility(default).
|
||||
if (D->getASTContext().getTargetInfo().getTriple().isOSDarwin()) {
|
||||
for (const auto *A : D->specific_attrs<AvailabilityAttr>())
|
||||
if (A->getPlatform()->getName().equals("macos"))
|
||||
return DefaultVisibility;
|
||||
}
|
||||
|
||||
return None;
|
||||
}
|
||||
|
||||
|
|
|
@ -8,9 +8,9 @@
|
|||
void f2();
|
||||
void f2() { }
|
||||
|
||||
// CHECK-10_4-LABEL: define void @f3
|
||||
// CHECK-10_5-LABEL: define void @f3
|
||||
// CHECK-10_6-LABEL: define void @f3
|
||||
// CHECK-10_4-LABEL: define hidden void @f3
|
||||
// CHECK-10_5-LABEL: define hidden void @f3
|
||||
// CHECK-10_6-LABEL: define hidden void @f3
|
||||
void f3() __attribute__((availability(macosx,introduced=10.5)));
|
||||
void f3() { }
|
||||
|
||||
|
|
Loading…
Reference in New Issue