Patchwork use build_function_type_list a few places in the ObjC frontend

login
register
mail settings
Submitter Nathan Froyd
Date April 20, 2011, 5:27 p.m.
Message ID <20110420172705.GP23480@codesourcery.com>
Download mbox | patch
Permalink /patch/92251/
State New
Headers show

Comments

Nathan Froyd - April 20, 2011, 5:27 p.m.
Just as $SUBJECT suggests.  All the other uses of
build_function_type_list are tied up with get_arg_type_list and will
therefore have to wait for a better FUNCTION_TYPE builder.

Tested on x86_64-unknown-linux-gnu.  IIUC the changes to
objc-next-runtime-abi-02.c would not be tested on that platform, so it
would be helpful to have a Darwin tester double-check my work.

OK to commit?

-Nathan

	* objc-act.c (synth_module_prologue): Call build_function_type_list
	instead of build_function_type.
	* objc-next-runtime-abi-02.c (next_runtime_02_initialize):
	Likewise.
Mike Stump - April 20, 2011, 9:05 p.m.
On Apr 20, 2011, at 10:27 AM, Nathan Froyd wrote:
> Tested on x86_64-unknown-linux-gnu.  IIUC the changes to
> objc-next-runtime-abi-02.c would not be tested on that platform, so it
> would be helpful to have a Darwin tester double-check my work.

Just check http://gcc.gnu.org/regtest/HEAD/ after about 10 hours.

> OK to commit?

Ok.

Patch

diff --git a/gcc/objc/objc-act.c b/gcc/objc/objc-act.c
index b48f179..0b6b793 100644
--- a/gcc/objc/objc-act.c
+++ b/gcc/objc/objc-act.c
@@ -2995,8 +2995,8 @@  synth_module_prologue (void)
   build_fast_enumeration_state_template ();
   
   /* void objc_enumeration_mutation (id) */
-  type = build_function_type (void_type_node,
-			      tree_cons (NULL_TREE, objc_object_type, NULL_TREE));
+  type = build_function_type_list (void_type_node,
+				   objc_object_type, NULL_TREE);
   objc_enumeration_mutation_decl 
     = add_builtin_function (TAG_ENUMERATION_MUTATION, type, 0, NOT_BUILT_IN, 
 			    NULL, NULL_TREE);
diff --git a/gcc/objc/objc-next-runtime-abi-02.c b/gcc/objc/objc-next-runtime-abi-02.c
index 4ce0159..f3cf359 100644
--- a/gcc/objc/objc-next-runtime-abi-02.c
+++ b/gcc/objc/objc-next-runtime-abi-02.c
@@ -492,9 +492,8 @@  static void next_runtime_02_initialize (void)
   build_v2_ehtype_template ();
 
   /* void * objc_begin_catch (void *) */
-  type = build_function_type (ptr_type_node,
-			      tree_cons (NULL_TREE, ptr_type_node,
-			      OBJC_VOID_AT_END));
+  type = build_function_type_list (ptr_type_node,
+				   ptr_type_node, NULL_TREE);
 
   objc2_begin_catch_decl = add_builtin_function ("objc_begin_catch",
 						 type, 0, NOT_BUILT_IN,
@@ -502,14 +501,13 @@  static void next_runtime_02_initialize (void)
   TREE_NOTHROW (objc2_begin_catch_decl) = 0;
 
   /* void objc_end_catch () */
-  type = build_function_type (void_type_node, OBJC_VOID_AT_END);
+  type = build_function_type_list (void_type_node, NULL_TREE);
   objc2_end_catch_decl = add_builtin_function ("objc_end_catch",
 						type, 0, NOT_BUILT_IN,
 						NULL, NULL_TREE);
   TREE_NOTHROW (objc2_end_catch_decl) = 0;
 
   /* void objc_exception_rethrow (void) */
-  type = build_function_type (void_type_node, OBJC_VOID_AT_END);
   objc_rethrow_exception_decl = 
 			add_builtin_function ("objc_exception_rethrow",
 					      type, 0, NOT_BUILT_IN,