From 198891e6b915da53407f65525c3c90b098ea8c8e Mon Sep 17 00:00:00 2001 From: midipix Date: Sat, 2 Feb 2019 01:11:38 -0500 Subject: midipix_symbol_ref_dllimport_p(): properly support -fvisibility=hidden, etc. --- gcc/config/i386/midipix.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'gcc/config') 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; } -- cgit v1.2.3