[PATCH] D36191: [CodeGen] Don't make availability attributes imply default visibility on macos
Phabricator via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Aug 8 10:11:11 PDT 2017
This revision was automatically updated to reflect the committed changes.
Closed by commit rL310382: [Availability] Don't make an availability attribute imply default visibility on… (authored by epilk).
Changed prior to commit:
https://reviews.llvm.org/D36191?vs=109218&id=110223#toc
Repository:
rL LLVM
https://reviews.llvm.org/D36191
Files:
cfe/trunk/docs/ReleaseNotes.rst
cfe/trunk/lib/AST/Decl.cpp
cfe/trunk/test/CodeGen/attr-availability.c
Index: cfe/trunk/test/CodeGen/attr-availability.c
===================================================================
--- cfe/trunk/test/CodeGen/attr-availability.c
+++ cfe/trunk/test/CodeGen/attr-availability.c
@@ -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() { }
Index: cfe/trunk/lib/AST/Decl.cpp
===================================================================
--- cfe/trunk/lib/AST/Decl.cpp
+++ cfe/trunk/lib/AST/Decl.cpp
@@ -216,14 +216,6 @@
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;
}
Index: cfe/trunk/docs/ReleaseNotes.rst
===================================================================
--- cfe/trunk/docs/ReleaseNotes.rst
+++ cfe/trunk/docs/ReleaseNotes.rst
@@ -94,6 +94,9 @@
Attribute Changes in Clang
--------------------------
+- The presence of __attribute__((availability(...))) on a declaration no longer
+ implies default visibility for that declaration on macOS.
+
- ...
Windows Support
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D36191.110223.patch
Type: text/x-patch
Size: 1602 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170808/f9d3b366/attachment.bin>
More information about the cfe-commits
mailing list