summaryrefslogtreecommitdiff
path: root/gcc/godump.c
Commit message (Collapse)AuthorAgeFilesLines
* * godump.c (go_output_typedef): Dump size of structs.ian2012-04-221-0/+20
| | | | | | | mksysinfo, syscall: Change Sizeof names from var to const. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@186678 138bc75d-0d04-0410-961f-82ee72b054a4
* * godump.c (struct macro_hash_value): Define.ian2011-11-021-40/+115
| | | | | | | | | | | | | | | | | | (macro_hash_hashval): New static function. (macro_hash_eq, macro_hash_del): New static functions. (go_define): Use macro_hash_value to store values in macro_hash. Replace an old value on a redefinition. Don't print anything to go_dump_file. (go_undef): Delete the entry from the hash table. (go_output_typedef): For an enum, use macro_hash_value, and don't print anything to go_dump_file. (go_print_macro): New static function. (go_finish): Traverse macro_hash with go_print_macro. (dump_go_spec_init): Update macro_hash creation for macro_hash_value. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@180762 138bc75d-0d04-0410-961f-82ee72b054a4
* * godump.c (go_output_typedef): Support printing enum values thatian2011-10-031-3/+14
| | | | | | | don't fit in a signed HOST_WIDE_INT. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@179477 138bc75d-0d04-0410-961f-82ee72b054a4
* * godump.c (go_define): Treat a single character in single quotes,ian2011-09-231-0/+12
| | | | | | | or a string, as an operand. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@179118 138bc75d-0d04-0410-961f-82ee72b054a4
* * godump.c (go_format_type): Correct length of name added toian2011-05-311-1/+1
| | | | | | | obstack for anonymous field. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@174465 138bc75d-0d04-0410-961f-82ee72b054a4
* * godump.c (go_format_type): Output the first field with a usableian2011-05-261-6/+41
| | | | | | | Go type, if any. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@174262 138bc75d-0d04-0410-961f-82ee72b054a4
* * godump.c (go_format_type): Check for invalid type names, pointerian2011-05-261-34/+45
| | | | | | | target types, and struct field types. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@174253 138bc75d-0d04-0410-961f-82ee72b054a4
* * godump.c (go_define): Don't accept a string immediately afterian2011-05-241-1/+5
| | | | | | | another operand. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@174141 138bc75d-0d04-0410-961f-82ee72b054a4
* * godump.c (struct godump_container): Add invalid_hash field.ian2011-05-241-14/+28
| | | | | | | | | (go_format_type): Return false if type is found in invalid_hash. (go_output_typedef): Add invalid type to invalid_hash. (go_finish): Create and delete invalid_hash. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@174140 138bc75d-0d04-0410-961f-82ee72b054a4
* remove TYPE_ARG_TYPES from godump.cfroydnj2011-05-201-14/+12
| | | | | | | * godump.c (go_format_type): Don't use TYPE_ARG_TYPES. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@173980 138bc75d-0d04-0410-961f-82ee72b054a4
* * godump.c (go_output_typedef): Put enum constants in the macroian2011-05-201-3/+18
| | | | | | | hash table to avoid duplicate Go const definitions. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@173962 138bc75d-0d04-0410-961f-82ee72b054a4
* * godump.c (go_format_type): Use exported Go name for anonymousian2011-04-211-1/+1
| | | | | | | field name. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@172847 138bc75d-0d04-0410-961f-82ee72b054a4
* * godump.c (go_define): Ignore macros whose definitions includeian2011-01-291-0/+3
| | | | | | | two adjacent operands. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@169385 138bc75d-0d04-0410-961f-82ee72b054a4
* * godump.c (go_define): Improve lexing of macro expansion to onlyian2011-01-261-60/+243
| | | | | | | accept expressions which match Go spec. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@169270 138bc75d-0d04-0410-961f-82ee72b054a4
* * godump.c (go_output_var): Don't output the variable if there isian2011-01-111-1/+15
| | | | | | | already a type with the same name. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@168683 138bc75d-0d04-0410-961f-82ee72b054a4
* * godump.c (go_format_type): Don't generate float80.ian2011-01-111-4/+1
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@168682 138bc75d-0d04-0410-961f-82ee72b054a4
* gcc/:ian2010-11-151-0/+874
* godump.c: New file. * common.opt (fdump-go-spec=): New option. * tree.h: Add comments for TYPE_SYMTAB_ADDRESS and friends. (TYPE_SYMTAB_IS_ADDRESS, TYPE_SYMTAB_IS_POINTER): Define. (TYPE_SYMTAB_IS_DIE): Define. (struct tree_type): Change GTY for symtab field to use TYPE_SYMTAB_IS_ADDRESS and friends and to use a debug_hooks field to pick the union field. * debug.h (struct gcc_debug_hooks): Add tree_type_symtab_field. (dump_go_spec_init): Declare. * toplev.c (process_options): Handle flag_dump_go_spec. * debug.c: Include "tree.h". (do_nothing_debug_hooks): Set tree_type_symtab_field. * dwarf2out.c (dwarf2_debug_hooks): Likewise. * dbxout.c (dbx_debug_hooks): Likewise. (xcoff_debug_hooks): Likewise. * vmsdbgout.c (vmsdbg_debug_hooks): Likewise. * sdbout.c (sdb_debug_hooks): Likewise. Do not define if SDB_DEBUGGING_INFO is not defined. * doc/invoke.texi (Option Summary): Mention -fdump-go-spec. (Overall Options): Document -fdump-go-spec. * Makefile.in (OBJS-common): Add godump.o. (debug.o): Add dependency on $(TREE_H). (godump.o): New target. (GTFILES): Add $(srcdir)/godump.c. gcc/c-family/: * c-lex.c (init_c_lex): Set macro debug callbacks if flag_dump_go_spec is set. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@166770 138bc75d-0d04-0410-961f-82ee72b054a4