This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[patch lto/c++/middle-end/windows]: Fix handling of dllexport for LTO as externally_visible


Hello,

this patch introduces an new flag for dllexport (likewise to the already 
existing DLLIMPORT flag) to structure tree_decl_with_vis in tree.h header. 
As some places still dependent on checking explicit for 
dllimport/dllexport attribute, I didn't omitted here the the attribute 
node copy. This is maybe something for 4.7 gcc.

ChangeLog

        * config/i386/winnt-cxx.c (maybe_add_dllexport): Set 
DECL_DLLEXPORT_P.
        * config/i386/winnt.c (i386_pe_determine_dllexport_p): Use 
DECL_DLLEXPORT_P
        instead of doing attribute lookup.
        * tree.c (merge_dllimport_decl_attributes): Likewise.
        (handle_dll_attribute): Set DECL_DLLEXPORT_P flag.
        * lto-streamer-in.c (unpack_ts_decl_with_vis_value_fields): 
Restore dllexport flag.
        * lto-streamer-out.c (pack_ts_decl_with_vis_value_fields): Save 
dllexport flag.
        * tree-emutls.c (new_emutls_decl): Copy DECL_DLLEXPORT_P flag.
        * tree.h (tree_decl_with_vis):Add new member dllexport_flag.
        (DECL_DLLEXPORT_P): New macro.
        * ipa.c (cgraph_externally_visible_p): Check for DECL_DLLEXPORT_P.
        (varpool_externally_visible_p): Likewise.
        *cp/optimize.c (maybe_clone_body): Copy DECL_DLLEXPORT_P, too.

Tested for x86_64-w64-mingw32, i686-w64-mingw32, and i686-pc-cygwin. Ok 
for apply?

Regards,
 i.A. Kai Tietz

|  (\_/)  This is Bunny. Copy and paste Bunny
| (='.'=) into your signature to help him gain
| (")_(") world domination.

Attachment: dllexport.diff
Description: Binary data


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]