summaryrefslogtreecommitdiff
path: root/gcc/config
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2019-02-02 01:11:38 -0500
committermidipix <writeonce@midipix.org>2019-02-02 01:11:38 -0500
commit198891e6b915da53407f65525c3c90b098ea8c8e (patch)
treef7c164f3163d78c03325d52e461def7385636657 /gcc/config
parentf16f6109f1a4d3bca6e48ba043e665f1f7ec99e3 (diff)
downloadcbb-gcc-4.6.4-198891e6b915da53407f65525c3c90b098ea8c8e.tar.bz2
cbb-gcc-4.6.4-198891e6b915da53407f65525c3c90b098ea8c8e.tar.xz
midipix_symbol_ref_dllimport_p(): properly support -fvisibility=hidden, etc.
Diffstat (limited to 'gcc/config')
-rw-r--r--gcc/config/i386/midipix.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/gcc/config/i386/midipix.c b/gcc/config/i386/midipix.c
index b194a33c3..5f4fe5145 100644
--- a/gcc/config/i386/midipix.c
+++ b/gcc/config/i386/midipix.c
@@ -535,7 +535,11 @@ int midipix_symbol_ref_dllimport_p(rtx symbol)
{
tree decl = SYMBOL_REF_DECL(symbol);
- return decl && decl->base.public_flag &&
- (!decl->decl_with_vis.visibility_specified
- || (decl->decl_with_vis.visibility == VISIBILITY_DEFAULT));
+ if (!decl || !decl->base.public_flag)
+ return 0;
+
+ if (decl->decl_with_vis.visibility == VISIBILITY_DEFAULT)
+ return (default_visibility == VISIBILITY_DEFAULT);
+
+ return 0;
}