[llvm-bugs] [Bug 33796] New: availability attributes override visibility
via llvm-bugs
llvm-bugs at lists.llvm.org
Fri Jul 14 17:39:52 PDT 2017
https://bugs.llvm.org/show_bug.cgi?id=33796
Bug ID: 33796
Summary: availability attributes override visibility
Product: clang
Version: unspecified
Hardware: PC
OS: All
Status: NEW
Severity: enhancement
Priority: P
Component: C++
Assignee: unassignedclangbugs at nondot.org
Reporter: nicolasweber at gmx.de
CC: dgregor at apple.com, llvm-bugs at lists.llvm.org
We're moving Chrome to @available, which requires tagging some of our code with
API_AVAILABLE(10.10). However, that seems to also make classes visible, which
we don't want:
$ cat test.cc
#define F
class F Foo {
void f();
};
void Foo::f() {}
$ bin/clang -c test.cc -mmacosx-version-min=10.10 -fvisibility=hidden
-fvisibility-inlines-hidden && ld -dylib -o libtest.dylib test.o && nm
libtest.dylib
ld: warning: -macosx_version_min not specified, assuming 10.10
0000000000000fb0 t __ZN3Foo1fEv
$ cat test.cc
#define F __attribute__((availability(macos, introduced=10.11)))
class F Foo {
void f();
};
void Foo::f() {}
$ bin/clang -c test.cc -mmacosx-version-min=10.10 -fvisibility=hidden
-fvisibility-inlines-hidden && ld -dylib -o libtest.dylib test.o && nm
libtest.dylib
ld: warning: -macosx_version_min not specified, assuming 10.10
0000000000000fb0 T __ZN3Foo1fEv
That's hopefully just a bug, and not by design?
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20170715/edcd25c8/attachment.html>
More information about the llvm-bugs
mailing list