diff options
author | amylaar <amylaar@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-07-13 21:55:57 +0000 |
---|---|---|
committer | amylaar <amylaar@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-07-13 21:55:57 +0000 |
commit | 12e18540e67cec225113893f3744def89a0d2250 (patch) | |
tree | 78e64b469ad027c41fccce9021395470fd154b69 /gcc/tree-pretty-print.c | |
parent | 34c9b12285378f2ec20c45916e08f38fee1930e7 (diff) | |
download | gcc-12e18540e67cec225113893f3744def89a0d2250.tar.gz |
gcc:
PR other/44874
* tree-dump.c (dump_options): Add enumerate_locals entry.
Add TDF_NOID exclusion to all entry.
* tree-dump.h (dump_enumerated_decls): Declare.
* tree-pretty-print.c (dump_generic_node): For TDF_NOID,
Don't display type uid.
(print_declaration): Don't crash on TREE_TYPE (t) == 0.
* tree-pass.h (TDF_ENUMERATE_LOCALS): Define.
* tree-ssa-live.c: Include gimple.h.
(numbered_tree_d): New struct.
(numbered_tree): New typedef.
(DEF_VEC_O (numbered_tree): New.
(DEF_VEC_ALLOC_O (numbered_tree, heap)): Likewise.
(compare_decls_by_uid, dump_enumerated_decls_push): New functions.
(dump_enumerated_decls): Likewise.
* tree-optimize.c (execute_cleanup_cfg_post_optimizing): If comparing
debug info and flag_dump_final_insns, call dump_enumerated_decls.
* tree-cfg.c (dump_function_to_file): Call dump_enumerated_decls.
* Makefile.in (tree-ssa-live.o): Depend on $(GIMPLE_H).
gcc/testsuite:
PR other/44874
PR debug/44832
* c-c++-common/pr44832.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@162156 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-pretty-print.c')
-rw-r--r-- | gcc/tree-pretty-print.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/tree-pretty-print.c b/gcc/tree-pretty-print.c index db85caf8cef..fde91844ec7 100644 --- a/gcc/tree-pretty-print.c +++ b/gcc/tree-pretty-print.c @@ -757,6 +757,8 @@ dump_generic_node (pretty_printer *buffer, tree node, int spc, int flags, pp_string (buffer, str); if (TYPE_NAME (node) && DECL_NAME (TYPE_NAME (node))) dump_decl_name (buffer, TYPE_NAME (node), flags); + else if (flags & TDF_NOUID) + pp_printf (buffer, "<Txxxx>"); else pp_printf (buffer, "<T%x>", TYPE_UID (node)); @@ -1081,6 +1083,8 @@ dump_generic_node (pretty_printer *buffer, tree node, int spc, int flags, } if (TYPE_NAME (node) && DECL_NAME (TYPE_NAME (node))) dump_decl_name (buffer, TYPE_NAME (node), flags); + else if (flags & TDF_NOUID) + pp_printf (buffer, "<Txxxx>"); else pp_printf (buffer, "<T%x>", TYPE_UID (node)); dump_function_declaration (buffer, node, spc, flags); @@ -2312,7 +2316,7 @@ print_declaration (pretty_printer *buffer, tree t, int spc, int flags) pp_string (buffer, "static "); /* Print the type and name. */ - if (TREE_CODE (TREE_TYPE (t)) == ARRAY_TYPE) + if (TREE_TYPE (t) && TREE_CODE (TREE_TYPE (t)) == ARRAY_TYPE) { tree tmp; |