Merge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly
[dragonfly.git] / gnu / usr.bin / cc34 / cc1plus / patches / rtti.c.patch
1 $DragonFly: src/gnu/usr.bin/cc34/cc1plus/patches/rtti.c.patch,v 1.1 2004/12/21 13:10:47 joerg Exp $
2
3 ===================================================================
4 RCS file: /home/joerg/wd/repository/dragonflybsd/src/contrib/gcc-3.4/gcc/cp/rtti.c,v
5 retrieving revision 1.1
6 diff -u -r1.1 rtti.c
7 --- rtti.c      20 Jun 2004 02:14:51 -0000      1.1
8 +++ rtti.c      20 Dec 2004 20:59:07 -0000
9 @@ -361,7 +361,11 @@
10        pushdecl_top_level_and_finish (d, NULL_TREE);
11  
12        if (CLASS_TYPE_P (type))
13 -       CLASSTYPE_TYPEINFO_VAR (TYPE_MAIN_VARIANT (type)) = d;
14 +       {
15 +         CLASSTYPE_TYPEINFO_VAR (TYPE_MAIN_VARIANT (type)) = d;
16 +         DECL_VISIBILITY (d) = CLASSTYPE_VISIBILITY (type);
17 +         DECL_VISIBILITYSPECIFIED (d) = CLASSTYPE_VISIBILITYSPECIFIED (type);
18 +       }
19  
20        /* Remember the type it is for.  */
21        TREE_TYPE (name) = type;
22 @@ -759,6 +763,11 @@
23      TREE_STATIC (name_decl) = 1;
24      DECL_EXTERNAL (name_decl) = 0;
25      TREE_PUBLIC (name_decl) = 1;
26 +    if (CLASS_TYPE_P (target))
27 +      {
28 +        DECL_VISIBILITY (name_decl) = CLASSTYPE_VISIBILITY (target);
29 +        DECL_VISIBILITYSPECIFIED (name_decl) = CLASSTYPE_VISIBILITYSPECIFIED (target);
30 +      }
31      import_export_tinfo (name_decl, target, typeinfo_in_lib_p (target));
32      /* External name of the string containing the type's name has a
33         special name.  */