gkeating 02/11/13 10:39:46
Modified: live/gcc3/gcc/cp decl2.c rtti.c
Log:
Correct merge problem with typeinfo for basic types.
Revision Changes Path
1.97 +2 -1 src/live/gcc3/gcc/cp/decl2.c
Index: decl2.c
===================================================================
RCS file: /cvs/Darwin/src/live/gcc3/gcc/cp/decl2.c,v
retrieving revision 1.96
retrieving revision 1.97
diff -u -r1.96 -r1.97
--- decl2.c 2002/10/26 02:45:51 1.96
+++ decl2.c 2002/11/13 18:39:45 1.97
@@ -2026,7 +2026,8 @@
/* APPLE LOCAL coalescing */
#ifdef MAKE_DECL_COALESCED
TREE_PUBLIC (decl) = 1;
- MAKE_DECL_COALESCED (decl);
+ if (! is_in_library)
+ MAKE_DECL_COALESCED (decl);
#endif /* MAKE_DECL_COALESCED */
}
1.14 +2 -53 src/live/gcc3/gcc/cp/rtti.c
Index: rtti.c
===================================================================
RCS file: /cvs/Darwin/src/live/gcc3/gcc/cp/rtti.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- rtti.c 2002/10/24 23:46:51 1.13
+++ rtti.c 2002/11/13 18:39:45 1.14
@@ -758,7 +758,8 @@
/* APPLE LOCAL begin coalescing */
/* coalesce typeinfo */
#ifdef MAKE_DECL_COALESCED
- MAKE_DECL_COALESCED (name_decl);
+ if (!typeinfo_in_lib_p (target))
+ MAKE_DECL_COALESCED (name_decl);
#endif /* MAKE_DECL_COALESCED */
/* APPLE LOCAL end coalescing */
@@ -1128,58 +1129,6 @@
return generic_initializer (var_desc, type);
}
}
-
-#if 0 /* APPLE LOCAL more orphaned code */
-/* Create the real typeinfo variable. NON_PUBLIC indicates that we cannot
- make this variable public (comdat). */
-
-static tree
-create_real_tinfo_var (target_type, name, type, init, non_public)
- tree target_type;
- tree name;
- tree type;
- tree init;
- int non_public;
-{
- static int count = 0;
- tree decl;
- tree hidden_name;
- char hidden[30];
-
- /* We cannot give this the name NAME, as that already is globally
- bound to the tinfo_decl we originally created for this type in
- get_tinfo_decl. */
- sprintf (hidden, "__ti_%d", count++);
- hidden_name = get_identifier (hidden);
-
- decl = build_lang_decl (VAR_DECL, hidden_name,
- build_qualified_type (type, TYPE_QUAL_CONST));
- DECL_ARTIFICIAL (decl) = 1;
- TREE_READONLY (decl) = 1;
- TREE_STATIC (decl) = 1;
- DECL_EXTERNAL (decl) = 0;
-
- if (!non_public)
- {
- TREE_PUBLIC (decl) = 1;
- if (flag_weak || !typeinfo_in_lib_p (target_type))
- comdat_linkage (decl);
- /* APPLE LOCAL begin coalescing */
- /* coalesce typeinfo */
-#ifdef MAKE_DECL_COALESCED
- if (!typeinfo_in_lib_p (target_type))
- MAKE_DECL_COALESCED (decl);
-#endif /* MAKE_DECL_COALESCED */
- /* APPLE LOCAL end coalescing */
- }
- SET_DECL_ASSEMBLER_NAME (decl, name);
- DECL_INITIAL (decl) = init;
- cp_finish_decl (decl, init, NULL_TREE, 0);
- pushdecl_top_level (decl);
- TREE_USED (decl) = 1;
- return decl;
-}
-#endif
/* Generate the RECORD_TYPE containing the data layout of a type_info
derivative as used by the runtime. This layout must be consistent with