diff options
author | Jason Merrill <jason@redhat.com> | 2009-07-03 20:43:26 -0400 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2009-07-03 20:43:26 -0400 |
commit | b97e8a149d534e07f19af44c23882d9f09df575f (patch) | |
tree | 9605692ffc98995bbab96bc7e30193329746fca0 /gcc/cp/ptree.c | |
parent | 07302a1bb6c0842e0bf214ec7d551a99c76efa8f (diff) | |
download | gcc-b97e8a149d534e07f19af44c23882d9f09df575f.zip gcc-b97e8a149d534e07f19af44c23882d9f09df575f.tar.gz gcc-b97e8a149d534e07f19af44c23882d9f09df575f.tar.bz2 |
cp-tree.h (struct lang_decl): Overhaul.
* cp-tree.h (struct lang_decl): Overhaul.
(struct lang_decl_flags): Remove.
(struct lang_decl_base): New.
(struct lang_decl_min): New.
(struct lang_decl_fn): New.
(struct lang_decl_ns): New.
(CAN_HAVE_FULL_LANG_DECL_P): Replace with LANG_DECL_HAS_MIN.
(LANG_DECL_MIN_CHECK): New.
(LANG_DECL_FN_CHECK): New.
(LANG_DECL_NS_CHECK): New.
(STRIP_TEMPLATE): New.
(NON_THUNK_FUNCTION_CHECK): Remove.
(DECL_DECLARES_FUNCTION_P): New.
(lots): Adjust.
* lex.c (retrofit_lang_decl, cxx_dup_lang_specific_decl): Adjust.
* decl.c (push_local_name, duplicate_decls): Adjust.
* decl2.c (start_objects): Don't set u2sel.
* semantics.c (finish_omp_threadprivate): Adjust.
* class.c (build_clone): Don't do much on TEMPLATE_DECLs.
(decl_cloned_function_p): Out-of-line implementation of macros.
(clone_function_decl, adjust_clone_args): Use DECL_CLONED_FUNCTION_P.
* mangle.c (write_unqualified_name): Don't check function flags
on non-functions.
* method.c (make_alias_for): Don't set DECL_CLONED_FUNCTION.
* pt.c (build_template_decl): Don't set function flags.
(check_default_tmpl_args): Check that it's a function.
(instantiate_template): Use DECL_ABSTRACT_ORIGIN to find the
cloned template.
* pt.c (tsubst_decl) [FUNCTION_DECL]: Don't tsubst
DECL_CLONED_FUNCTION.
* cp-tree.h (struct lang_type_class): Move sorted_fields here.
* class.c (finish_struct_1): Adjust.
* ptree.c (cxx_print_decl, cxx_print_type): Adjust.
* search.c (lookup_field_1): Adjust.
* cp-tree.h (CLASSTYPE_INLINE_FRIENDS): Remove.
* decl.c (finish_method): Don't add to it.
* class.c (fixup_pending_inline): Remove.
(fixup_inline_methods): Remove.
(finish_struct_1): Don't call it.
* error.c (dump_function_name): Handle null name.
From-SVN: r149217
Diffstat (limited to 'gcc/cp/ptree.c')
-rw-r--r-- | gcc/cp/ptree.c | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/gcc/cp/ptree.c b/gcc/cp/ptree.c index 2452abc..ec7a471 100644 --- a/gcc/cp/ptree.c +++ b/gcc/cp/ptree.c @@ -65,10 +65,6 @@ cxx_print_decl (FILE *file, tree node, int indent) && DECL_PENDING_INLINE_INFO (node)) fprintf (file, " pending-inline-info %p", (void *) DECL_PENDING_INLINE_INFO (node)); - if (TREE_CODE (node) == TYPE_DECL - && DECL_SORTED_FIELDS (node)) - fprintf (file, " sorted-fields %p", - (void *) DECL_SORTED_FIELDS (node)); if ((TREE_CODE (node) == FUNCTION_DECL || TREE_CODE (node) == VAR_DECL) && DECL_TEMPLATE_INFO (node)) fprintf (file, " template-info %p", @@ -95,13 +91,6 @@ cxx_print_type (FILE *file, tree node, int indent) print_node (file, "throws", TYPE_RAISES_EXCEPTIONS (node), indent + 4); return; - case RECORD_TYPE: - case UNION_TYPE: - indent_to (file, indent + 4); - fprintf (file, "full-name \"%s\"", - type_as_string (node, TFF_CLASS_KEY_OR_ENUM)); - break; - default: return; } @@ -113,6 +102,10 @@ cxx_print_type (FILE *file, tree node, int indent) if (! CLASS_TYPE_P (node)) return; + indent_to (file, indent + 4); + fprintf (file, "full-name \"%s\"", + type_as_string (node, TFF_CLASS_KEY_OR_ENUM)); + indent_to (file, indent + 3); if (TYPE_NEEDS_CONSTRUCTING (node)) @@ -140,6 +133,9 @@ cxx_print_type (FILE *file, tree node, int indent) fputs (" delete[]", file); if (TYPE_HAS_ASSIGN_REF (node)) fputs (" this=(X&)", file); + if (CLASSTYPE_SORTED_FIELDS (node)) + fprintf (file, " sorted-fields %p", + (void *) CLASSTYPE_SORTED_FIELDS (node)); if (TREE_CODE (node) == RECORD_TYPE) { |