objc-act.c (build_module_descriptor): Make sure the init function is not deferred.
authorStan Shebs <shebs@apple.com>
Fri, 28 Dec 2001 23:22:05 +0000 (23:22 +0000)
committerStan Shebs <shebs@gcc.gnu.org>
Fri, 28 Dec 2001 23:22:05 +0000 (23:22 +0000)
* objc/objc-act.c (build_module_descriptor): Make sure the init
function is not deferred.
(build_dispatch_table_initializer): Compute the method encoding if
not already done.

From-SVN: r48356

gcc/ChangeLog
gcc/objc/objc-act.c

index b9905441156be3b44543171366e5fdc81174dba3..895a9afdce359a4743735b947c3266a59b8bf0a8 100644 (file)
@@ -1,3 +1,10 @@
+2001-12-28  Stan Shebs  <shebs@apple.com>
+
+       * objc/objc-act.c (build_module_descriptor): Make sure the init
+       function is not deferred.
+       (build_dispatch_table_initializer): Compute the method encoding if
+       not already done.
+
 2001-12-28  Kazu Hirata  <kazu@hxi.com>
 
        * doc/md.texi: Add @findex define_insn_and_split.
index 96e13237b24d874cee9575e66a6603331277e146..8dd08011177d0aac988bd86bc2e8669134893458 100644 (file)
@@ -1763,6 +1763,9 @@ build_module_descriptor ()
     init_function_decl = current_function_decl;
     TREE_PUBLIC (init_function_decl) = ! targetm.have_ctors_dtors;
     TREE_USED (init_function_decl) = 1;
+    /* Don't let this one be deferred.  */
+    DECL_INLINE (init_function_decl) = 0;
+    DECL_UNINLINABLE (init_function_decl) = 1;
     current_function_cannot_inline
       = "static constructors and destructors cannot be inlined";
 
@@ -3856,6 +3859,11 @@ build_dispatch_table_initializer (type, entries)
                            build_selector (METHOD_SEL_NAME (entries)),
                            NULL_TREE);
 
+      /* Generate the method encoding if we don't have one already.  */
+      if (! METHOD_ENCODING (entries))
+       METHOD_ENCODING (entries) =
+         encode_method_def (METHOD_DEFINITION (entries));
+
       elemlist = tree_cons (NULL_TREE,
                            add_objc_string (METHOD_ENCODING (entries),
                                             meth_var_types),