[llvm-commits] [llvm-gcc-4.2] r45741 - /llvm-gcc-4.2/trunk/gcc/objc/objc-act.c
Bill Wendling
isanbard at gmail.com
Mon Jan 7 22:08:04 PST 2008
Author: void
Date: Tue Jan 8 00:08:04 2008
New Revision: 45741
URL: http://llvm.org/viewvc/llvm-project?rev=45741&view=rev
Log:
Make the metaclass and some other metadata variables local instead of global.
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=45741&r1=45740&r2=45741&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/objc/objc-act.c (original)
+++ llvm-gcc-4.2/trunk/gcc/objc/objc-act.c Tue Jan 8 00:08:04 2008
@@ -9925,12 +9925,24 @@
/* struct class_t OBJC_CLASS_$_<my_name>; */
UOBJC_V2_CLASS_decl = build_metadata_decl ("OBJC_CLASS_$",
/* APPLE LOCAL radar 5202926 */
+ /* APPLE LOCAL begin radar 5658734 */
+#ifndef ENABLE_LLVM
objc_v2_class_template, true);
+#else
+ objc_v2_class_template, false);
+#endif
+ /* APPLE LOCAL end radar 5658734 */
/* struct class_t OBJC_METACLASS_$_<my_name>; */
UOBJC_V2_METACLASS_decl = build_metadata_decl ("OBJC_METACLASS_$",
/* APPLE LOCAL radar 5202926 */
+ /* APPLE LOCAL begin radar 5658734 */
+#ifndef ENABLE_LLVM
objc_v2_class_template, true);
+#else
+ objc_v2_class_template, false);
+#endif
+ /* APPLE LOCAL end radar 5658734 */
}
static void
@@ -12034,7 +12046,16 @@
sav = objc_implementation_context;
objc_implementation_context = my_root_int;
/* APPLE LOCAL radar 5202926 */
- root_expr = build_metadata_decl ("OBJC_METACLASS_$", objc_v2_class_template, true);
+ /* APPLE LOCAL begin radar 5658734 */
+#ifndef ENABLE_LLVM
+ root_expr = build_metadata_decl ("OBJC_METACLASS_$", objc_v2_class_template,
+ true);
+#else
+ root_expr = build_metadata_decl ("OBJC_METACLASS_$", objc_v2_class_template,
+ false);
+#endif
+ root_expr = update_var_decl (root_expr);
+ /* APPLE LOCAL end radar 5658734 */
root_expr = build_fold_addr_expr (root_expr);
/* Install class `isa' and `super' pointers at runtime. */
@@ -12045,10 +12066,32 @@
back-end, recognizes '_OBJC_' prefix and prepends an 'L' in front of this. Darwin
assembler treats names starting with 'L_' as local symbols. */
/* APPLE LOCAL radar 5202926 */
- class_superclass_expr = build_metadata_decl ("OBJC_CLASS_$", objc_v2_class_template, true);
+ /* APPLE LOCAL begin radar 5658734 */
+#ifndef ENABLE_LLVM
+ class_superclass_expr = build_metadata_decl ("OBJC_CLASS_$",
+ objc_v2_class_template,
+ true);
+#else
+ class_superclass_expr = build_metadata_decl ("OBJC_CLASS_$",
+ objc_v2_class_template,
+ false);
+#endif
+ class_superclass_expr = update_var_decl (class_superclass_expr);
+ /* APPLE LOCAL end radar 5658734 */
class_superclass_expr = build_fold_addr_expr (class_superclass_expr);
/* APPLE LOCAL radar 5202926 */
- metaclass_superclass_expr = build_metadata_decl ("OBJC_METACLASS_$", objc_v2_class_template, true);
+ /* APPLE LOCAL begin radar 5658734 */
+#ifndef ENABLE_LLVM
+ metaclass_superclass_expr = build_metadata_decl ("OBJC_METACLASS_$",
+ objc_v2_class_template,
+ true);
+#else
+ metaclass_superclass_expr = build_metadata_decl ("OBJC_METACLASS_$",
+ objc_v2_class_template,
+ false);
+#endif
+ metaclass_superclass_expr = update_var_decl (metaclass_superclass_expr);
+ /* APPLE LOCAL end radar 5658734 */
metaclass_superclass_expr = build_fold_addr_expr (metaclass_superclass_expr);
objc_implementation_context = sav;
}
More information about the llvm-commits
mailing list