diff options
author | law <law@138bc75d-0d04-0410-961f-82ee72b054a4> | 1998-07-07 00:05:27 +0000 |
---|---|---|
committer | law <law@138bc75d-0d04-0410-961f-82ee72b054a4> | 1998-07-07 00:05:27 +0000 |
commit | c6f5e8325357602304889c798a90f2e6161a602e (patch) | |
tree | 75c3f6b8a5b39fd43548abba6d1860adc4b7c3fe /gcc/tree.h | |
parent | 729610a150dcbf65fd985bb1a3ca7eb1266b15af (diff) | |
download | gcc-c6f5e8325357602304889c798a90f2e6161a602e.tar.gz |
Support for dllimport and dllexport attributes for i386-pe.
* tree.h (DECL_NON_ADDR_CONST_P): New accessor macro.
(struct tree_decl): Add non_addr_const_p field.
* tree.c (staticp): Use.
* i386/cygwin32.h (CPP_PREDEFINES): Map __declspec(x) to GCC
attributes.
(SUBTARGET_SWITCHES): Switches to turn on/off dllimport|export
attributes. Also accept -mwindows option.
(VALID_MACHINE_DECL_ATTRIBUTE): New macro.
(MERGE_MACHINE_DECL_ATTRIBUTE): New macro.
(REDO_SECTION_INFO_P): New macro.
(DRECTVE_SECTION_FUNCTION): New macro.
(drectve_section): Cover function to implement above.
(SWITCH_TO_SECTION_FUNCTION): New macro.
(switch_to_section): Covert function to implement above.
(EXTRA_SECTIONS): Add in_drectve.
(EXTRA_SECTION_FUNCTIONS): Add in_drectve and switch_to_section.
(ENCODE_SECTION_INFO): Delete old macro and redefine as a function.
(STRIP_NAME_ENCODING): Handle new attributes.
(ASM_OUTPUT_LABELREF): New macro.
(ASM_OUTPUT_FUNCTION_NAME): New macro.
(ASM_OUTPUT_COMMON): New macro.
(ASM_OUTPUT_DECLARE_OBJECT_NAME): New macro.
* i386/mingw32.h (CPP_PREDEFINES): Map __declspec(x) to GCC
attributes.
* i386/winnt.c (i386_pe_valid_decl_attribute_p): New function.
(i386_pe_merge_decl_attributes): New function.
(i386_pe_check_vtable_importexport): New function.
(i386_pe_dllexport_p): New function.
(i386_pe_dllimport_p): New function.
(i386_pe_dllexport_name_p): New function.
(i386_pe_dllimport_name_p): New function.
(i386_pe_mark_dllexport): New function.
(i386_pe_mark_dllimport): New function.
(i386_pe_encode_section_info): New function.
(i386_pe_unique_section): Strip encoding from name first.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@20983 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree.h')
-rw-r--r-- | gcc/tree.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/tree.h b/gcc/tree.h index b98f5552fa6..c79270bf2a7 100644 --- a/gcc/tree.h +++ b/gcc/tree.h @@ -1201,6 +1201,10 @@ struct tree_type #define DECL_LANG_FLAG_6(NODE) (DECL_CHECK (NODE)->decl.lang_flag_6) #define DECL_LANG_FLAG_7(NODE) (DECL_CHECK (NODE)->decl.lang_flag_7) +/* Used to indicate that the pointer to this DECL cannot be treated as + an address constant. */ +#define DECL_NON_ADDR_CONST_P(NODE) (DECL_CHECK (NODE)->decl.non_addr_const_p) + struct tree_decl { char common[sizeof (struct tree_common)]; @@ -1242,6 +1246,8 @@ struct tree_decl unsigned lang_flag_6 : 1; unsigned lang_flag_7 : 1; + unsigned non_addr_const_p : 1; + /* For a FUNCTION_DECL, if inline, this is the size of frame needed. If built-in, this is the code for which built-in function. For other kinds of decls, this is DECL_ALIGN. */ |