aboutsummaryrefslogtreecommitdiff
path: root/gcc/godump.c
AgeCommit message (Collapse)AuthorFilesLines
2011-11-02godump.c (struct macro_hash_value): Define.Ian Lance Taylor1-40/+115
* godump.c (struct macro_hash_value): Define. (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. From-SVN: r180762
2011-10-03godump.c (go_output_typedef): Support printing enum values that don't fit in ↵Jakub Jelinek1-3/+14
a signed HOST_WIDE_INT. * godump.c (go_output_typedef): Support printing enum values that don't fit in a signed HOST_WIDE_INT. Co-Authored-By: Ian Lance Taylor <iant@google.com> From-SVN: r179477
2011-09-23godump.c (go_define): Treat a single character in single quotes, or a ↵Ian Lance Taylor1-0/+12
string, as an operand. * godump.c (go_define): Treat a single character in single quotes, or a string, as an operand. From-SVN: r179118
2011-05-31godump.c (go_format_type): Correct length of name added to obstack for ↵Ian Lance Taylor1-1/+1
anonymous field. * godump.c (go_format_type): Correct length of name added to obstack for anonymous field. From-SVN: r174465
2011-05-26godump.c (go_format_type): Output the first field with a usable Go type, if any.Ian Lance Taylor1-6/+41
* godump.c (go_format_type): Output the first field with a usable Go type, if any. From-SVN: r174262
2011-05-26godump.c (go_format_type): Check for invalid type names, pointer target ↵Ian Lance Taylor1-34/+45
types, and struct field types. * godump.c (go_format_type): Check for invalid type names, pointer target types, and struct field types. From-SVN: r174253
2011-05-24godump.c (go_define): Don't accept a string immediately after another operand.Ian Lance Taylor1-1/+5
* godump.c (go_define): Don't accept a string immediately after another operand. From-SVN: r174141
2011-05-24godump.c (struct godump_container): Add invalid_hash field.Ian Lance Taylor1-14/+28
* godump.c (struct godump_container): Add invalid_hash field. (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. From-SVN: r174140
2011-05-20remove TYPE_ARG_TYPES from godump.cNathan Froyd1-14/+12
remove TYPE_ARG_TYPES from godump.c * godump.c (go_format_type): Don't use TYPE_ARG_TYPES. From-SVN: r173980
2011-05-20godump.c (go_output_typedef): Put enum constants in the macro hash table to ↵Ian Lance Taylor1-3/+18
avoid duplicate Go const definitions. * godump.c (go_output_typedef): Put enum constants in the macro hash table to avoid duplicate Go const definitions. From-SVN: r173962
2011-04-21godump.c (go_format_type): Use exported Go name for anonymous field name.Ian Lance Taylor1-1/+1
* godump.c (go_format_type): Use exported Go name for anonymous field name. From-SVN: r172847
2011-01-29godump.c (go_define): Ignore macros whose definitions include two adjacent ↵Ian Lance Taylor1-0/+3
operands. * godump.c (go_define): Ignore macros whose definitions include two adjacent operands. From-SVN: r169385
2011-01-26godump.c (go_define): Improve lexing of macro expansion to only accept ↵Ian Lance Taylor1-60/+243
expressions which match Go spec. * godump.c (go_define): Improve lexing of macro expansion to only accept expressions which match Go spec. From-SVN: r169270
2011-01-11godump.c (go_output_var): Don't output the variable if there is already a ↵Ian Lance Taylor1-1/+15
type with the same name. * godump.c (go_output_var): Don't output the variable if there is already a type with the same name. From-SVN: r168683
2011-01-11* godump.c (go_format_type): Don't generate float80.Ian Lance Taylor1-4/+1
From-SVN: r168682
2010-11-15godump.c: New file.Ian Lance Taylor1-0/+874
gcc/: * 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. From-SVN: r166770