darwin.c (darwin_assemble_visibility): Treat VISIBILITY_INTERNAL as hidden.
* config/darwin.c (darwin_assemble_visibility): Treat VISIBILITY_INTERNAL as hidden. * config/darwin-c.c (find_subframework_file): Add missing const. (framework_construct_pathname): Likewise. From-SVN: r192085
This commit is contained in:
parent
f591bd8f50
commit
b674cffe66
5 changed files with 14 additions and 6 deletions
|
@ -1,3 +1,11 @@
|
|||
2012-10-04 Jason Merrill <jason@redhat.com>
|
||||
|
||||
* config/darwin.c (darwin_assemble_visibility): Treat
|
||||
VISIBILITY_INTERNAL as hidden.
|
||||
|
||||
* config/darwin-c.c (find_subframework_file): Add missing const.
|
||||
(framework_construct_pathname): Likewise.
|
||||
|
||||
2012-10-04 Florian Weimer <fweimer@redhat.com>
|
||||
|
||||
* doc/cpp.texi (Pragmas): Document #pragma GCC warning, #pragma
|
||||
|
|
|
@ -267,7 +267,7 @@ static struct framework_header framework_header_dirs[] = {
|
|||
static char *
|
||||
framework_construct_pathname (const char *fname, cpp_dir *dir)
|
||||
{
|
||||
char *buf;
|
||||
const char *buf;
|
||||
size_t fname_len, frname_len;
|
||||
cpp_dir *fast_dir;
|
||||
char *frname;
|
||||
|
@ -344,7 +344,7 @@ find_subframework_file (const char *fname, const char *pname)
|
|||
{
|
||||
char *sfrname;
|
||||
const char *dot_framework = ".framework/";
|
||||
char *bufptr;
|
||||
const char *bufptr;
|
||||
int sfrname_len, i, fname_len;
|
||||
struct cpp_dir *fast_dir;
|
||||
static struct cpp_dir subframe_dir;
|
||||
|
|
|
@ -2623,7 +2623,7 @@ darwin_assemble_visibility (tree decl, int vis)
|
|||
{
|
||||
if (vis == VISIBILITY_DEFAULT)
|
||||
;
|
||||
else if (vis == VISIBILITY_HIDDEN)
|
||||
else if (vis == VISIBILITY_HIDDEN || vis == VISIBILITY_INTERNAL)
|
||||
{
|
||||
fputs ("\t.private_extern ", asm_out_file);
|
||||
assemble_name (asm_out_file,
|
||||
|
@ -2631,7 +2631,7 @@ darwin_assemble_visibility (tree decl, int vis)
|
|||
fputs ("\n", asm_out_file);
|
||||
}
|
||||
else
|
||||
warning (OPT_Wattributes, "internal and protected visibility attributes "
|
||||
warning (OPT_Wattributes, "protected visibility attribute "
|
||||
"not supported in this configuration; ignored");
|
||||
}
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* Test that #pragma GCC visibility does not override class member specific settings. */
|
||||
/* { dg-do compile } */
|
||||
/* { dg-require-visibility "internal" } */
|
||||
/* { dg-final { scan-assembler "\\.internal.*Foo.methodEv" { target { ! *-*-solaris2* } } } } */
|
||||
/* { dg-final { scan-assembler "\\.internal.*Foo.methodEv" { target { ! *-*-solaris2* } { ! *-*-darwin* } } } }*/
|
||||
/* { dg-final { scan-assembler "\\.(internal|hidden).*Foo.methodEv" { target *-*-solaris2* } } } */
|
||||
|
||||
#pragma GCC visibility push(hidden)
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* Test that #pragma GCC visibility does not override class member specific settings. */
|
||||
/* { dg-do compile } */
|
||||
/* { dg-require-visibility "internal" } */
|
||||
/* { dg-final { scan-assembler "\\.internal.*Foo.methodEv" { target { ! *-*-solaris2* } } } } */
|
||||
/* { dg-final { scan-assembler "\\.internal.*Foo.methodEv" { target { ! *-*-solaris2* } { ! *-*-darwin* } } } } */
|
||||
/* { dg-final { scan-assembler "\\.(internal|hidden).*Foo.methodEv" { target *-*-solaris2* } } } */
|
||||
|
||||
#pragma GCC visibility push(hidden)
|
||||
|
|
Loading…
Add table
Reference in a new issue