[PATCH] D36191: [CodeGen] Don't make availability attributes imply default visibility on macos
thakis added a comment. Err sorry, landed in https://reviews.llvm.org/rL310382. Repository: rL LLVM https://reviews.llvm.org/D36191 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[PATCH] D36191: [CodeGen] Don't make availability attributes imply default visibility on macos
thakis added a comment. Herald added a subscriber: llvm-commits. What's the status here? Repository: rL LLVM https://reviews.llvm.org/D36191 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[PATCH] D36191: [CodeGen] Don't make availability attributes imply default visibility on macos
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=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()) - 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 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()) - 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 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[PATCH] D36191: [CodeGen] Don't make availability attributes imply default visibility on macos
thakis added a comment. Is landing this blocked on internal testing? https://reviews.llvm.org/D36191 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[PATCH] D36191: [CodeGen] Don't make availability attributes imply default visibility on macos
thakis added a comment. Awesome, thanks! Maybe mention the PR# for this in the commit message. https://reviews.llvm.org/D36191 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[PATCH] D36191: [CodeGen] Don't make availability attributes imply default visibility on macos
arphaman accepted this revision. arphaman added a comment. This revision is now accepted and ready to land. LGTM. Please document this change in the release notes. https://reviews.llvm.org/D36191 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[PATCH] D36191: [CodeGen] Don't make availability attributes imply default visibility on macos
erik.pilkington created this revision. Previously, the presence of `__attribute__((availability(macos, ...)))` on a declaration caused clang to make the vis of that decl implicitly default. This is a hack that is incomparable with how we're treating availability attributes now, and should be removed. Thanks for taking a look! Erik https://reviews.llvm.org/D36191 Files: lib/AST/Decl.cpp test/CodeGen/attr-availability.c Index: test/CodeGen/attr-availability.c === --- test/CodeGen/attr-availability.c +++ 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: lib/AST/Decl.cpp === --- lib/AST/Decl.cpp +++ 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()) - if (A->getPlatform()->getName().equals("macos")) -return DefaultVisibility; - } - return None; } Index: test/CodeGen/attr-availability.c === --- test/CodeGen/attr-availability.c +++ 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: lib/AST/Decl.cpp === --- lib/AST/Decl.cpp +++ 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()) - if (A->getPlatform()->getName().equals("macos")) -return DefaultVisibility; - } - return None; } ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits