PATCH: Add objc-lang.c, further cleanup

Ziemowit Laski zlaski@apple.com
Sat Dec 1 23:29:00 GMT 2001


This patch moves the lang_hooks machinery from objc-act.c to
a newly-created objc-lang.c, for symmetry with other front-ends.
Also, a real hash function (i.e., one based on the value rather
than the address) has been provided for storing message
selectors.  Finally, typos and copyright notices have been
corrected here and there.

Bootstrapped successfully on i686-pc-linux-gnu (that's right!),
no regressions.  OK to commit?

--Zem

2001-12-02  Ziemowit Laski  <zlaski@apple.com>

[gcc/ChangeLog]

	* Makefile.in (c-objc-common.o): Add objc/objc-act.h as
	a dependency.
	* c-lang.c (maybe_add_objc_tree_codes): Add dummy function
	to be used by C (but not ObjC).
	* c-objc-common.c: Include objc-act.h
	(c_objc_common_init): Add call to maybe_add_objc_tree_codes().
	* objc/Make-lang.in: Update copyright.
	(OBJC_OBJS): Add objc-lang.o.
	(objc-lang.o): New rule.
	* objc/config-lang.in: Fix file description and update
	copyright.
	* objc/objc-act.c: Do not include langhooks.h and
	langhooks-def.h
	(lang_hooks): Move (along with LANG_HOOKS...) to objc-lang.c.
	(objc_post_options): Move to objc-lang.c.
	(objc_init_options): Move to objc-lang.c.
	(objc_init): Make non-static.
	(objc_decode_option): Make non-static.
	(HASHFUNCTION): Remove macro.
	(hash_func): New function.
	(hash_enter): Replace HASHFUNCTION with hash_func.
	(hash_lookup): Replace HASHFUNCTION with hash_func.
	(maybe_objc_tree_codes): New function.
	(init_objc): Move ObjC tree code initialization to
	maybe_objc_tree_codes().
	* objc/objc-act.h (GCC_OBJC_ACT_H): New include guard.
	(objc_init): New public prototype.
	(objc_decode_option): New public prototype.
	(maybe_add_objc_tree_codes): New public prototype.
	* objc/objc-lang.c (lang_hooks): Moved from objc-act.c.
	(objc_post_options): Move from objc-act.c.
	(objc_init_options): Move from objc-act.c.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: objc.diff
Type: application/octet-stream
Size: 16422 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20011201/50c8f74c/attachment.obj>
-------------- next part --------------

--------------------------------------------------------------
Ziemowit Laski                   Apple Computer, Inc.
zlaski@apple.com                 2 Infinite Loop, MS 302-4SN
+1.408.974.6229  Fax .1344       Cupertino, CA  95014-2085


More information about the Gcc-patches mailing list