tree.c (handle_dll_attribute): Move here from i383/winnt.c.
authorMark Mitchell <mark@codesourcery.com>
Fri, 6 Aug 2004 02:03:29 +0000 (02:03 +0000)
committerMark Mitchell <mmitchel@gcc.gnu.org>
Fri, 6 Aug 2004 02:03:29 +0000 (02:03 +0000)
commitb2ca370228811541d31d023ffd1280f5a819d8f2
tree69d71a8f79d4ab453d9ed298e91ba4813f6f9760
parent01e054665da8e46a14bb326cee073e48ee0366ef
tree.c (handle_dll_attribute): Move here from i383/winnt.c.

* tree.c (handle_dll_attribute): Move here from i383/winnt.c.
Replace use of DECL_INLINE with DECL_DECLARED_INLINE_P.  Set
DECL_VISIBLITY.  Test TARGET_DLLIMPORT_DECL_ATTRIBUTES with #if.
* tree.h (handle_dll_attribute): Declare.  Test
TARGET_DLLIMPORT_DECL_ATTRIBUTES with #if.
* c-common.h (c_determine_visibility): Declare.
* c-common.c (c_determine_visibility): New function.
* c-decl.c (finish_decl): Use it.
(finish_function): Likewise.
* defaults.h (TARGET_DLLIMPORT_DECL_ATTRIBUTES): Define it to
zero, by default.  Use #if, not #ifdef, to test it.
* config/arm/arm.c (arm_attribute_table): Use
handle_dll_attribute.  Test TARGET_DLLIMPORT_DECL_ATTRIBUTES with
#if.
* config/arm/pe.h (TARGET_DLLIMPORT_DECL_ATTRIBUTES): Define to 1.
* config/i386/cygming.h (TARGET_DLLIMPORT_DECL_ATTRIBUTES): Define
to 1.
* config/i386/i386-protos.h (ix86_handle_dll_attribute): Remove.
* config/i386/i386.c (ix86_attribute_table): Use
handle_dll_attribute for dllimport/dllexport.  Test
TARGET_DLLIMPORT_DECL_ATTRIBUTES with #if.
* config/i386/winnt.c (ix86_handle_dll_attribute): Remove.
* config/mcore/mcore.h (TARGET_DLLIMPORT_DECL_ATTRIBUTES): Define
it to 1.
* config/mcore/mcore.c (TARGET_DLLIMPORT_DECL_ATTRIBUTES): Test it
with #if.
* config/sh/symbian-pre.h (TARGET_DLLIMPORT_DECL_ATTRIBUTES): Define
it to 1.
* doc/extend.texi (dllexport): Clarify and correct documentation.
(dllimport): Likewise.
* doc/tm.texi (TARGET_DLLIMPORT_DECL_ATTRIBUTES): Mention
handle_dll_attribute.

* decl.c (start_preparsed_function): Move determine_visibility
call.
* decl2.c (determine_visibility): Incorporate dllexport testing.

* g++.dg/ext/visibility/assign1.C: Use scan-hidden and
dg-require-visiblity.
* g++.dg/ext/visibility/fvisibility-inlines-hidden.C: Likewise.
* g++.dg/ext/visibility/fvisibility.C: Likewise.
* g++.dg/ext/visibility/memfuncts.C: Likewise.
* g++.dg/ext/visibility/new1.C: Likewise.
* g++.dg/ext/visibility/pragma.C: Likewise.
* g++.dg/ext/visibility/staticmemfuncts.C: Likewise.
* g++.dg/ext/visibility/virtual.C: Likewise.
* g++/dg/ext/visibility/visibility-1.C: Likewise.
* g++/dg/ext/visibility/visibility-2.C: Likewise.
* g++/dg/ext/visibility/visibility-3.C: Likewise.
* g++/dg/ext/visibility/visibility-4.C: Likewise.
* g++/dg/ext/visibility/visibility-5.C: Likewise.
* g++/dg/ext/visibility/visibility-6.C: Likewise.
* g++/dg/ext/visibility/visibility-7.C: Likewise.
* g++/dg/ext/visibility/visibility-8.C: New test.
* gcc.c-torture/compile/dll.x: Remove.
* gcc.dg/dll-2.c: Use dg-require-dll
* gcc.dg/visibility-10.c: New test.
* lib/gcc-dg.exp (dg-require-dll): Add Symbian to list of targets
supporting DLLs.
* testsuite/lib/scanasm.exp (scan_hidden): New function.
(scan_not_hidden): Likewise.

From-SVN: r85621
43 files changed:
gcc/ChangeLog
gcc/c-common.c
gcc/c-common.h
gcc/c-decl.c
gcc/config/arm/arm.c
gcc/config/arm/pe.h
gcc/config/i386/cygming.h
gcc/config/i386/i386-protos.h
gcc/config/i386/i386.c
gcc/config/i386/winnt.c
gcc/config/mcore/mcore.c
gcc/config/mcore/mcore.h
gcc/config/sh/symbian-pre.h
gcc/cp/ChangeLog
gcc/cp/decl.c
gcc/cp/decl2.c
gcc/defaults.h
gcc/doc/extend.texi
gcc/doc/tm.texi
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/ext/visibility/assign1.C
gcc/testsuite/g++.dg/ext/visibility/fvisibility-inlines-hidden.C
gcc/testsuite/g++.dg/ext/visibility/fvisibility.C
gcc/testsuite/g++.dg/ext/visibility/memfuncts.C
gcc/testsuite/g++.dg/ext/visibility/new1.C
gcc/testsuite/g++.dg/ext/visibility/pragma.C
gcc/testsuite/g++.dg/ext/visibility/staticmemfuncts.C
gcc/testsuite/g++.dg/ext/visibility/virtual.C
gcc/testsuite/g++.dg/ext/visibility/visibility-1.C
gcc/testsuite/g++.dg/ext/visibility/visibility-2.C
gcc/testsuite/g++.dg/ext/visibility/visibility-3.C
gcc/testsuite/g++.dg/ext/visibility/visibility-4.C
gcc/testsuite/g++.dg/ext/visibility/visibility-5.C
gcc/testsuite/g++.dg/ext/visibility/visibility-6.C
gcc/testsuite/g++.dg/ext/visibility/visibility-7.C
gcc/testsuite/g++.dg/ext/visibility/visibility-8.C [new file with mode: 0644]
gcc/testsuite/gcc.c-torture/compile/dll.x [deleted file]
gcc/testsuite/gcc.dg/dll-2.c
gcc/testsuite/gcc.dg/visibility-10.c [new file with mode: 0644]
gcc/testsuite/lib/gcc-dg.exp
gcc/testsuite/lib/scanasm.exp
gcc/tree.c
gcc/tree.h