diff options
author | Danny Smith <dansmister@gmail.com> | 2009-07-12 06:09:39 +0000 |
---|---|---|
committer | Danny Smith <dannysmith@gcc.gnu.org> | 2009-07-12 06:09:39 +0000 |
commit | b20231fe2437d57d4b97aba62a0c28a68c9719dd (patch) | |
tree | 67739660575e53277c7a81761c5f9254f4504802 | |
parent | b96a645580b7d659e5723859802bcc44b25fc505 (diff) | |
download | gcc-b20231fe2437d57d4b97aba62a0c28a68c9719dd.zip gcc-b20231fe2437d57d4b97aba62a0c28a68c9719dd.tar.gz gcc-b20231fe2437d57d4b97aba62a0c28a68c9719dd.tar.bz2 |
winnt.c (i386_pe_determine_dllexport_p): Don't dllexport if !TREE_PUBLIC.
* config/i386/winnt.c (i386_pe_determine_dllexport_p): Don't
dllexport if !TREE_PUBLIC.
(i386_pe_maybe_record_exported_symbol): Assert TREE_PUBLIC.
From-SVN: r149525
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/config/i386/winnt.c | 6 |
2 files changed, 12 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 4356b5a..c8a3950 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2009-07-12 Danny Smith <dansmister@gmail.com> + + * config/i386/winnt.c (i386_pe_determine_dllexport_p): Don't + dllexport if !TREE_PUBLIC. + (i386_pe_maybe_record_exported_symbol): Assert TREE_PUBLIC. + 2009-07-11 Anatoly Sokolov <aesok@post.ru> * config/avr/avr.h (TARGET_CPU_CPP_BUILTINS): Redefine. diff --git a/gcc/config/i386/winnt.c b/gcc/config/i386/winnt.c index fe5081d..7069c40 100644 --- a/gcc/config/i386/winnt.c +++ b/gcc/config/i386/winnt.c @@ -107,6 +107,10 @@ i386_pe_determine_dllexport_p (tree decl) if (TREE_CODE (decl) != VAR_DECL && TREE_CODE (decl) != FUNCTION_DECL) return false; + /* Don't export local clones of dllexports. */ + if (!TREE_PUBLIC (decl)) + return false; + if (lookup_attribute ("dllexport", DECL_ATTRIBUTES (decl))) return true; @@ -601,6 +605,8 @@ i386_pe_maybe_record_exported_symbol (tree decl, const char *name, int is_data) if (!SYMBOL_REF_DLLEXPORT_P (symbol)) return; + gcc_assert (TREE_PUBLIC (decl)); + p = (struct export_list *) ggc_alloc (sizeof *p); p->next = export_head; p->name = name; |