(build_selector_translation_table): Reset current_function_decl after hack_function_p...
authorKresten Krab Thorup <krab@gcc.gnu.org>
Fri, 19 Aug 1994 15:36:22 +0000 (15:36 +0000)
committerKresten Krab Thorup <krab@gcc.gnu.org>
Fri, 19 Aug 1994 15:36:22 +0000 (15:36 +0000)
(build_selector_translation_table): Reset
current_function_decl after hack_function_prototype build it.
(build_module_descriptor): Return constructor name from functions
decl_rtl.

From-SVN: r7944

gcc/objc/objc-act.c

index f4ed5fdf2c7f458b31b81b325c86d896625dc5aa..b62ac123e927c9baf8e8921fbbd4370d13e8fb4a 100644 (file)
@@ -1569,10 +1569,11 @@ build_module_descriptor ()
 
     TREE_PUBLIC (current_function_decl) = 1;
 
+    function_decl = current_function_decl;
     finish_function (0);
 
     /* Return the name of the constructor function.  */
-    return IDENTIFIER_POINTER (init_function_name);
+    return XSTR (XEXP (DECL_RTL (function_decl), 0), 0);
   }
 }
 
@@ -1787,6 +1788,7 @@ build_selector_translation_table ()
       initlist = build_constructor (TREE_TYPE (UOBJC_SELECTOR_TABLE_decl),
                                    nreverse (initlist));
       finish_decl (UOBJC_SELECTOR_TABLE_decl, initlist, NULLT);
+      current_function_decl = NULLT;
     }
 }