diff options
author | gdr <gdr@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-07-03 06:50:51 +0000 |
---|---|---|
committer | gdr <gdr@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-07-03 06:50:51 +0000 |
commit | 5a471c32ebdf1fc4389379ffb96afb443a130462 (patch) | |
tree | 211037cba9c5f424653fb03ddd859f97f6a5e6f3 /gcc/cp/dump.c | |
parent | d4569a19105dc7eba0f5694bac1b9b4f753a2224 (diff) | |
download | gcc-5a471c32ebdf1fc4389379ffb96afb443a130462.tar.gz |
* tree-dump.h (dump_string_field): Declare.
* tree-dump.c: Use it instead of dump_string.
(dump_string_field): Make non-static.
cp/
* dump.c: Use dump_string_field.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@101547 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/dump.c')
-rw-r--r-- | gcc/cp/dump.c | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/gcc/cp/dump.c b/gcc/cp/dump.c index ed4ecb4227c..c63cfe2bd89 100644 --- a/gcc/cp/dump.c +++ b/gcc/cp/dump.c @@ -39,11 +39,11 @@ static void dump_access (dump_info_p di, tree t) { if (TREE_PROTECTED(t)) - dump_string (di, "protected"); + dump_string_field (di, "accs", "prot"); else if (TREE_PRIVATE(t)) - dump_string (di, "private"); + dump_string_field (di, "accs", "priv"); else - dump_string (di, "public"); + dump_string_field (di, "accs", "pub"); } /* Dump a representation of the specific operator for an overloaded @@ -215,7 +215,7 @@ cp_dump_tree (void* dump_info, tree t) if (DECL_P (t)) { if (DECL_LANG_SPECIFIC (t) && DECL_LANGUAGE (t) != lang_cplusplus) - dump_string (di, language_to_string (DECL_LANGUAGE (t))); + dump_string_field (di, "lang", language_to_string (DECL_LANGUAGE (t))); } switch (code) @@ -223,7 +223,7 @@ cp_dump_tree (void* dump_info, tree t) case IDENTIFIER_NODE: if (IDENTIFIER_OPNAME_P (t)) { - dump_string (di, "operator"); + dump_string_field (di, "note", "operator"); return true; } else if (IDENTIFIER_TYPENAME_P (t)) @@ -234,7 +234,7 @@ cp_dump_tree (void* dump_info, tree t) break; case OFFSET_TYPE: - dump_string (di, "ptrmem"); + dump_string_field (di, "note", "ptrmem"); dump_child ("ptd", TYPE_PTRMEM_POINTED_TO_TYPE (t)); dump_child ("cls", TYPE_PTRMEM_CLASS_TYPE (t)); return true; @@ -242,7 +242,7 @@ cp_dump_tree (void* dump_info, tree t) case RECORD_TYPE: if (TYPE_PTRMEMFUNC_P (t)) { - dump_string (di, "ptrmem"); + dump_string_field (di, "note", "ptrmem"); dump_child ("ptd", TYPE_PTRMEM_POINTED_TO_TYPE (t)); dump_child ("cls", TYPE_PTRMEM_CLASS_TYPE (t)); return true; @@ -276,7 +276,7 @@ cp_dump_tree (void* dump_info, tree t) { dump_child ("base", BINFO_TYPE (base_binfo)); if (BINFO_VIRTUAL_P (base_binfo)) - dump_string (di, "virtual"); + dump_string_field (di, "spec", "virt"); dump_access (di, base_binfo); } } @@ -285,55 +285,55 @@ cp_dump_tree (void* dump_info, tree t) case FIELD_DECL: dump_access (di, t); if (DECL_MUTABLE_P (t)) - dump_string(di, "mutable"); + dump_string_field (di, "spec", "mutable"); break; case VAR_DECL: if (TREE_CODE (CP_DECL_CONTEXT (t)) == RECORD_TYPE) dump_access (di, t); if (TREE_STATIC (t) && !TREE_PUBLIC (t)) - dump_string (di, "static"); + dump_string_field (di, "link", "static"); break; case FUNCTION_DECL: if (!DECL_THUNK_P (t)) { if (DECL_OVERLOADED_OPERATOR_P (t)) { - dump_string (di, "operator"); + dump_string_field (di, "note", "operator"); dump_op (di, t); } if (DECL_FUNCTION_MEMBER_P (t)) { - dump_string (di, "member"); + dump_string_field (di, "note", "member"); dump_access (di, t); } if (DECL_PURE_VIRTUAL_P (t)) - dump_string (di, "pure"); + dump_string_field (di, "spec", "pure"); if (DECL_VIRTUAL_P (t)) - dump_string (di, "virtual"); + dump_string_field (di, "spec", "virt"); if (DECL_CONSTRUCTOR_P (t)) - dump_string (di, "constructor"); + dump_string_field (di, "note", "constructor"); if (DECL_DESTRUCTOR_P (t)) - dump_string (di, "destructor"); + dump_string_field (di, "note", "destructor"); if (DECL_CONV_FN_P (t)) - dump_string (di, "conversion"); + dump_string_field (di, "note", "conversion"); if (DECL_GLOBAL_CTOR_P (t)) - dump_string (di, "global init"); + dump_string_field (di, "note", "global init"); if (DECL_GLOBAL_DTOR_P (t)) - dump_string (di, "global fini"); + dump_string_field (di, "note", "global fini"); if (DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION (t)) - dump_string (di, "pseudo tmpl"); + dump_string_field (di, "note", "pseudo tmpl"); } else { tree virt = THUNK_VIRTUAL_OFFSET (t); - dump_string (di, "thunk"); + dump_string_field (di, "note", "thunk"); if (DECL_THIS_THUNK_P (t)) - dump_string (di, "this adjusting"); + dump_string_field (di, "note", "this adjusting"); else { - dump_string (di, "result adjusting"); + dump_string_field (di, "note", "result adjusting"); if (virt) virt = BINFO_VPTR_FIELD (virt); } @@ -366,7 +366,7 @@ cp_dump_tree (void* dump_info, tree t) case TRY_BLOCK: dump_stmt (di, t); if (CLEANUP_P (t)) - dump_string (di, "cleanup"); + dump_string_field (di, "note", "cleanup"); dump_child ("body", TRY_STMTS (t)); dump_child ("hdlr", TRY_HANDLERS (t)); break; |