[llvm-commits] [llvm-gcc-4.2] r42615 - /llvm-gcc-4.2/trunk/gcc/objc/objc-act.c
Bill Wendling
isanbard at gmail.com
Thu Oct 4 15:18:01 PDT 2007
Author: void
Date: Thu Oct 4 17:18:01 2007
New Revision: 42615
URL: http://llvm.org/viewvc/llvm-project?rev=42615&view=rev
Log:
rdar://5476262 - Try to lookup the name of the global decl before creating a new
one.
Modified:
llvm-gcc-4.2/trunk/gcc/objc/objc-act.c
Modified: llvm-gcc-4.2/trunk/gcc/objc/objc-act.c
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/objc/objc-act.c?rev=42615&r1=42614&r2=42615&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/objc/objc-act.c (original)
+++ llvm-gcc-4.2/trunk/gcc/objc/objc-act.c Thu Oct 4 17:18:01 2007
@@ -11756,9 +11756,15 @@
tree decl = TREE_PURPOSE (chain);
gcc_assert (TREE_CODE (expr) == PROTOCOL_INTERFACE_TYPE);
/* APPLE LOCAL begin radar 4695109 */
- sprintf (string, "_OBJC_PROTOCOL_$_%s",
+ /* APPLE LOCAL begin - LLVM radar 5476262 */
+ sprintf (string, "L_OBJC_PROTOCOL_$_%s",
IDENTIFIER_POINTER (PROTOCOL_NAME (expr)));
- expr = start_var_decl (objc_v2_protocol_template, string);
+#ifdef ENABLE_LLVM
+ expr = lookup_name (get_identifier(string));
+ if (expr == NULL_TREE)
+#endif
+ expr = start_var_decl (objc_v2_protocol_template, &string[1]);
+ /* APPLE LOCAL end - LLVM radar 5476262 */
/* APPLE LOCAL end radar 4695109 */
expr = convert (objc_protocol_type, build_fold_addr_expr (expr));
finish_var_decl (decl, expr);
@@ -13299,6 +13305,9 @@
proto_name = synth_id_with_class_suffix ("_OBJC_PROTOCOL_$", p);
decl = start_var_decl (objc_v2_protocol_template, proto_name);
PROTOCOL_V2_FORWARD_DECL (p) = decl;
+ /* APPLE LOCAL begin - LLVM radar 5476262 */
+ pushdecl_top_level(decl);
+ /* APPLE LOCAL end - LLVM radar 5476262 */
}
/* APPLE LOCAL end radar 4695109 */
More information about the llvm-commits
mailing list