Commit 26cfb9ab by Kai Tietz Committed by Kai Tietz

re PR target/40068 (GCC fails to apply dllexport attribute to typeinfo.)

2012-02-07  Kai Tietz  <ktietz@redhat.com>
            Dave Korn  <dave.korn.cygwin@gmail.com>

        PR target/40068
        * config/i386/winnt-cxx.c (i386_pe_adjust_class_at_definition):
        Take care that typinfo gets dllexport-attribute.

Co-Authored-By: Dave Korn <dave.korn.cygwin@gmail.com>

From-SVN: r183962
parent b1b95093
2012-02-07 Kai Tietz <ktietz@redhat.com>
Dave Korn <dave.korn.cygwin@gmail.com>
PR target/40068
* config/i386/winnt-cxx.c (i386_pe_adjust_class_at_definition):
Take care that typinfo gets dllexport-attribute.
2012-02-07 Jakub Jelinek <jakub@redhat.com>
PR middle-end/52074
......
......@@ -97,6 +97,20 @@ i386_pe_adjust_class_at_definition (tree t)
if (lookup_attribute ("dllexport", TYPE_ATTRIBUTES (t)) != NULL_TREE)
{
tree tmv = TYPE_MAIN_VARIANT (t);
/* Make sure that we set dllexport attribute to typeinfo's
base declaration, as otherwise it would fail to be exported as
it isn't a class-member. */
if (tmv != NULL_TREE
&& CLASSTYPE_TYPEINFO_VAR (tmv) != NULL_TREE)
{
tree na, ti_decl = CLASSTYPE_TYPEINFO_VAR (tmv);
na = tree_cons (get_identifier ("dllexport"), NULL_TREE,
NULL_TREE);
decl_attributes (&ti_decl, na, 0);
}
/* Check static VAR_DECL's. */
for (member = TYPE_FIELDS (t); member; member = DECL_CHAIN (member))
if (TREE_CODE (member) == VAR_DECL)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment