Commit 178b70cc by Nathan Froyd Committed by Nathan Froyd

objc-act.c (synth_module_prologue): Use build_function_type_list instead of build_function_type.

	* objc-act.c (synth_module_prologue): Use build_function_type_list
	instead of build_function_type.
	(build_module_initializer_routine): Likewise.
	(build_next_objc_exception_stuff): Likewise.
	(build_objc_exception_stuff): Likewise.

From-SVN: r160066
parent d12a3d7e
2010-05-30 Nathan Froyd <froydnj@codesourcery.com>
* objc-act.c (synth_module_prologue): Use build_function_type_list
instead of build_function_type.
(build_module_initializer_routine): Likewise.
(build_next_objc_exception_stuff): Likewise.
(build_objc_exception_stuff): Likewise.
2010-05-27 Joseph Myers <joseph@codesourcery.com> 2010-05-27 Joseph Myers <joseph@codesourcery.com>
* objc-act.c: Include diagnostic-core.h instead of diagnostic.h. * objc-act.c: Include diagnostic-core.h instead of diagnostic.h.
......
...@@ -1666,10 +1666,10 @@ synth_module_prologue (void) ...@@ -1666,10 +1666,10 @@ synth_module_prologue (void)
/* id objc_msgSend_stret (id, SEL, ...); */ /* id objc_msgSend_stret (id, SEL, ...); */
/* id objc_msgSendNonNil_stret (id, SEL, ...); */ /* id objc_msgSendNonNil_stret (id, SEL, ...); */
type type
= build_function_type (objc_object_type, = build_varargs_function_type_list (objc_object_type,
tree_cons (NULL_TREE, objc_object_type, objc_object_type,
tree_cons (NULL_TREE, objc_selector_type, objc_selector_type,
NULL_TREE))); NULL_TREE);
umsg_decl = add_builtin_function (TAG_MSGSEND, umsg_decl = add_builtin_function (TAG_MSGSEND,
type, 0, NOT_BUILT_IN, type, 0, NOT_BUILT_IN,
NULL, NULL_TREE); NULL, NULL_TREE);
...@@ -1710,10 +1710,10 @@ synth_module_prologue (void) ...@@ -1710,10 +1710,10 @@ synth_module_prologue (void)
/* id objc_msgSendSuper (struct objc_super *, SEL, ...); */ /* id objc_msgSendSuper (struct objc_super *, SEL, ...); */
/* id objc_msgSendSuper_stret (struct objc_super *, SEL, ...); */ /* id objc_msgSendSuper_stret (struct objc_super *, SEL, ...); */
type type
= build_function_type (objc_object_type, = build_varargs_function_type_list (objc_object_type,
tree_cons (NULL_TREE, objc_super_type, objc_super_type,
tree_cons (NULL_TREE, objc_selector_type, objc_selector_type,
NULL_TREE))); NULL_TREE);
umsg_super_decl = add_builtin_function (TAG_MSGSENDSUPER, umsg_super_decl = add_builtin_function (TAG_MSGSENDSUPER,
type, 0, NOT_BUILT_IN, type, 0, NOT_BUILT_IN,
NULL, NULL_TREE); NULL, NULL_TREE);
...@@ -1728,19 +1728,18 @@ synth_module_prologue (void) ...@@ -1728,19 +1728,18 @@ synth_module_prologue (void)
/* GNU runtime messenger entry points. */ /* GNU runtime messenger entry points. */
/* typedef id (*IMP)(id, SEL, ...); */ /* typedef id (*IMP)(id, SEL, ...); */
tree IMP_type tree ftype =
= build_pointer_type build_varargs_function_type_list (objc_object_type,
(build_function_type (objc_object_type, objc_object_type,
tree_cons (NULL_TREE, objc_object_type, objc_selector_type,
tree_cons (NULL_TREE, objc_selector_type, NULL_TREE);
NULL_TREE)))); tree IMP_type = build_pointer_type (ftype);
/* IMP objc_msg_lookup (id, SEL); */ /* IMP objc_msg_lookup (id, SEL); */
type type = build_function_type_list (IMP_type,
= build_function_type (IMP_type, objc_object_type,
tree_cons (NULL_TREE, objc_object_type, objc_selector_type,
tree_cons (NULL_TREE, objc_selector_type, NULL_TREE);
OBJC_VOID_AT_END)));
umsg_decl = add_builtin_function (TAG_MSGSEND, umsg_decl = add_builtin_function (TAG_MSGSEND,
type, 0, NOT_BUILT_IN, type, 0, NOT_BUILT_IN,
NULL, NULL_TREE); NULL, NULL_TREE);
...@@ -1748,10 +1747,10 @@ synth_module_prologue (void) ...@@ -1748,10 +1747,10 @@ synth_module_prologue (void)
/* IMP objc_msg_lookup_super (struct objc_super *, SEL); */ /* IMP objc_msg_lookup_super (struct objc_super *, SEL); */
type type
= build_function_type (IMP_type, = build_function_type_list (IMP_type,
tree_cons (NULL_TREE, objc_super_type, objc_super_type,
tree_cons (NULL_TREE, objc_selector_type, objc_selector_type,
OBJC_VOID_AT_END))); NULL_TREE);
umsg_super_decl = add_builtin_function (TAG_MSGSENDSUPER, umsg_super_decl = add_builtin_function (TAG_MSGSENDSUPER,
type, 0, NOT_BUILT_IN, type, 0, NOT_BUILT_IN,
NULL, NULL_TREE); NULL, NULL_TREE);
...@@ -1762,9 +1761,9 @@ synth_module_prologue (void) ...@@ -1762,9 +1761,9 @@ synth_module_prologue (void)
__objc_exec_class (void *); */ __objc_exec_class (void *); */
type type
= build_function_type (void_type_node, = build_function_type_list (void_type_node,
tree_cons (NULL_TREE, ptr_type_node, ptr_type_node,
OBJC_VOID_AT_END)); NULL_TREE);
execclass_decl = add_builtin_function (TAG_EXECCLASS, execclass_decl = add_builtin_function (TAG_EXECCLASS,
type, 0, NOT_BUILT_IN, type, 0, NOT_BUILT_IN,
NULL, NULL_TREE); NULL, NULL_TREE);
...@@ -1772,10 +1771,9 @@ synth_module_prologue (void) ...@@ -1772,10 +1771,9 @@ synth_module_prologue (void)
/* id objc_getClass (const char *); */ /* id objc_getClass (const char *); */
type = build_function_type (objc_object_type, type = build_function_type_list (objc_object_type,
tree_cons (NULL_TREE, const_string_type_node,
const_string_type_node, NULL_TREE);
OBJC_VOID_AT_END));
objc_get_class_decl objc_get_class_decl
= add_builtin_function (TAG_GETCLASS, type, 0, NOT_BUILT_IN, = add_builtin_function (TAG_GETCLASS, type, 0, NOT_BUILT_IN,
...@@ -2399,13 +2397,11 @@ build_module_initializer_routine (void) ...@@ -2399,13 +2397,11 @@ build_module_initializer_routine (void)
PARM_DECL, NULL_TREE, void_type_node)); PARM_DECL, NULL_TREE, void_type_node));
#ifdef OBJCPLUS #ifdef OBJCPLUS
objc_start_function (get_identifier (TAG_GNUINIT), objc_start_function (get_identifier (TAG_GNUINIT),
build_function_type (void_type_node, build_function_type_list (void_type_node, NULL_TREE),
OBJC_VOID_AT_END),
NULL_TREE, NULL_TREE); NULL_TREE, NULL_TREE);
#else #else
objc_start_function (get_identifier (TAG_GNUINIT), objc_start_function (get_identifier (TAG_GNUINIT),
build_function_type (void_type_node, build_function_type_list (void_type_node, NULL_TREE),
OBJC_VOID_AT_END),
NULL_TREE, objc_get_parm_info (0)); NULL_TREE, objc_get_parm_info (0));
#endif #endif
body = c_begin_compound_stmt (true); body = c_begin_compound_stmt (true);
...@@ -4096,26 +4092,24 @@ build_next_objc_exception_stuff (void) ...@@ -4096,26 +4092,24 @@ build_next_objc_exception_stuff (void)
/* int _setjmp(...); */ /* int _setjmp(...); */
/* If the user includes <setjmp.h>, this shall be superseded by /* If the user includes <setjmp.h>, this shall be superseded by
'int _setjmp(jmp_buf);' */ 'int _setjmp(jmp_buf);' */
temp_type = build_function_type (integer_type_node, NULL_TREE); temp_type = build_function_type_list (integer_type_node, NULL_TREE);
objc_setjmp_decl objc_setjmp_decl
= add_builtin_function (TAG_SETJMP, temp_type, 0, NOT_BUILT_IN, NULL, NULL_TREE); = add_builtin_function (TAG_SETJMP, temp_type, 0, NOT_BUILT_IN, NULL, NULL_TREE);
/* id objc_exception_extract(struct _objc_exception_data *); */ /* id objc_exception_extract(struct _objc_exception_data *); */
temp_type temp_type
= build_function_type (objc_object_type, = build_function_type_list (objc_object_type,
tree_cons (NULL_TREE, build_pointer_type (objc_exception_data_template),
build_pointer_type (objc_exception_data_template), NULL_TREE);
OBJC_VOID_AT_END));
objc_exception_extract_decl objc_exception_extract_decl
= add_builtin_function (TAG_EXCEPTIONEXTRACT, temp_type, 0, NOT_BUILT_IN, NULL, = add_builtin_function (TAG_EXCEPTIONEXTRACT, temp_type, 0, NOT_BUILT_IN, NULL,
NULL_TREE); NULL_TREE);
/* void objc_exception_try_enter(struct _objc_exception_data *); */ /* void objc_exception_try_enter(struct _objc_exception_data *); */
/* void objc_exception_try_exit(struct _objc_exception_data *); */ /* void objc_exception_try_exit(struct _objc_exception_data *); */
temp_type temp_type
= build_function_type (void_type_node, = build_function_type_list (void_type_node,
tree_cons (NULL_TREE, build_pointer_type (objc_exception_data_template),
build_pointer_type (objc_exception_data_template), NULL_TREE);
OBJC_VOID_AT_END));
objc_exception_try_enter_decl objc_exception_try_enter_decl
= add_builtin_function (TAG_EXCEPTIONTRYENTER, temp_type, 0, NOT_BUILT_IN, NULL, = add_builtin_function (TAG_EXCEPTIONTRYENTER, temp_type, 0, NOT_BUILT_IN, NULL,
NULL_TREE); NULL_TREE);
...@@ -4125,10 +4119,8 @@ build_next_objc_exception_stuff (void) ...@@ -4125,10 +4119,8 @@ build_next_objc_exception_stuff (void)
/* int objc_exception_match(id, id); */ /* int objc_exception_match(id, id); */
temp_type temp_type
= build_function_type (integer_type_node, = build_function_type_list (integer_type_node,
tree_cons (NULL_TREE, objc_object_type, objc_object_type, objc_object_type, NULL_TREE);
tree_cons (NULL_TREE, objc_object_type,
OBJC_VOID_AT_END)));
objc_exception_match_decl objc_exception_match_decl
= add_builtin_function (TAG_EXCEPTIONMATCH, temp_type, 0, NOT_BUILT_IN, NULL, = add_builtin_function (TAG_EXCEPTIONMATCH, temp_type, 0, NOT_BUILT_IN, NULL,
NULL_TREE); NULL_TREE);
...@@ -4137,13 +4129,11 @@ build_next_objc_exception_stuff (void) ...@@ -4137,13 +4129,11 @@ build_next_objc_exception_stuff (void)
/* id objc_assign_ivar_Fast (id, id, unsigned int) /* id objc_assign_ivar_Fast (id, id, unsigned int)
__attribute__ ((hard_coded_address (OFFS_ASSIGNIVAR_FAST))); */ __attribute__ ((hard_coded_address (OFFS_ASSIGNIVAR_FAST))); */
temp_type temp_type
= build_function_type (objc_object_type, = build_function_type_list (objc_object_type,
tree_cons objc_object_type,
(NULL_TREE, objc_object_type, objc_object_type,
tree_cons (NULL_TREE, objc_object_type, unsigned_type_node,
tree_cons (NULL_TREE, NULL_TREE);
unsigned_type_node,
OBJC_VOID_AT_END))));
objc_assign_ivar_decl objc_assign_ivar_decl
= add_builtin_function (TAG_ASSIGNIVAR, temp_type, 0, NOT_BUILT_IN, = add_builtin_function (TAG_ASSIGNIVAR, temp_type, 0, NOT_BUILT_IN,
NULL, NULL_TREE); NULL, NULL_TREE);
...@@ -4162,10 +4152,10 @@ build_next_objc_exception_stuff (void) ...@@ -4162,10 +4152,10 @@ build_next_objc_exception_stuff (void)
/* id objc_assign_global (id, id *); */ /* id objc_assign_global (id, id *); */
/* id objc_assign_strongCast (id, id *); */ /* id objc_assign_strongCast (id, id *); */
temp_type = build_function_type (objc_object_type, temp_type = build_function_type_list (objc_object_type,
tree_cons (NULL_TREE, objc_object_type, objc_object_type,
tree_cons (NULL_TREE, build_pointer_type (objc_object_type), build_pointer_type (objc_object_type),
OBJC_VOID_AT_END))); NULL_TREE);
objc_assign_global_decl objc_assign_global_decl
= add_builtin_function (TAG_ASSIGNGLOBAL, temp_type, 0, NOT_BUILT_IN, NULL, = add_builtin_function (TAG_ASSIGNGLOBAL, temp_type, 0, NOT_BUILT_IN, NULL,
NULL_TREE); NULL_TREE);
...@@ -4185,9 +4175,9 @@ build_objc_exception_stuff (void) ...@@ -4185,9 +4175,9 @@ build_objc_exception_stuff (void)
/* void objc_exception_throw(id) __attribute__((noreturn)); */ /* void objc_exception_throw(id) __attribute__((noreturn)); */
/* void objc_sync_enter(id); */ /* void objc_sync_enter(id); */
/* void objc_sync_exit(id); */ /* void objc_sync_exit(id); */
temp_type = build_function_type (void_type_node, temp_type = build_function_type_list (void_type_node,
tree_cons (NULL_TREE, objc_object_type, objc_object_type,
OBJC_VOID_AT_END)); NULL_TREE);
objc_exception_throw_decl objc_exception_throw_decl
= add_builtin_function (TAG_EXCEPTIONTHROW, temp_type, 0, NOT_BUILT_IN, NULL, = add_builtin_function (TAG_EXCEPTIONTHROW, temp_type, 0, NOT_BUILT_IN, NULL,
noreturn_list); noreturn_list);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment