diff options
author | bryce <bryce@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-11-22 02:33:02 +0000 |
---|---|---|
committer | bryce <bryce@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-11-22 02:33:02 +0000 |
commit | 3119c950bd8c5f06ee2d61c2e8db88b98a7f8f0f (patch) | |
tree | 0e638461639b9ee591262162e137dc8d4432891b /gcc/cp/decl.c | |
parent | 1ff6063a627720169bb5577dd50a1d0ed0e531e6 (diff) | |
download | gcc-3119c950bd8c5f06ee2d61c2e8db88b98a7f8f0f.tar.gz |
* tree-dump.c: Rename from c-dump.c. Include c-tree.h, not c-common.h.
(lang_type_quals): Declare.
(dequeue_and_dump): Use lang_hooks.tree_dump.type_quals function to
retrieve language-specific qualifiers for a type node, instead of
C_TYPE_QUALS. Likewise for lang_hooks.tree_dump.dump_tree instead of
lang_dump_tree.
* tree-dump.h: Rename from c-dump.h.
* c-common.h (C_TYPE_QUALS): Removed.
Move declarations for tree-dump.c interface to...
* tree.h: ... here. Remove lang_dump_tree.
* langhooks.h (struct lang_hooks_for_tree_dump): New.
(struct lang_hooks): Add tree_dump hooks.
* langhooks.c (lhd_tree_dump_dump_tree): New function.
(lhd_tree_dump_type_quals): New function.
* langhooks-def.h (lhd_tree_dump_dump_tree, lhd_tree_dump_type_quals):
Declare.
(LANG_HOOKS_INITIALIZER): Add tree_dump hooks.
* Makefile.in: Move tree-dump.o to language-independent back-end.
cp:
* cp-tree.h (CP_TYPE_QUALS): Removed.
* decl.c (cxx_init_decl_processing): Don't set lang_dump_tree.
* cp-lang.c: Set LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN and
LANG_HOOKS_TREE_DUMP_TYPE_QUALS_FN.
* dump.c (cp_dump_tree): Use void* dump_info argument to match
lang-hooks prototype.
* call.c, cp-tree.h, cvt.c, decl.c, init.c, mangle.c, method.c, pt.c,
rtti.c, semantics.c, tree.c, typeck.c, typeck2.c: All references to
CP_TYPE_QUALS changed to cp_type_quals.
* Make-lang.in: References to c-dump.h changed to tree-dump.h.
(CXX_C_OBJS): Remove c-dump.o.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@47257 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/decl.c')
-rw-r--r-- | gcc/cp/decl.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index f7448f5f108..6fdb1c48d65 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -6408,7 +6408,6 @@ cxx_init_decl_processing () free_lang_status = &pop_cp_function_context; mark_lang_status = &mark_cp_function_context; lang_safe_from_p = &c_safe_from_p; - lang_dump_tree = &cp_dump_tree; lang_missing_noreturn_ok_p = &cp_missing_noreturn_ok_p; cp_parse_init (); @@ -9206,7 +9205,7 @@ build_ptrmemfunc_type (type) /* Make sure that we always have the unqualified pointer-to-member type first. */ - if (CP_TYPE_QUALS (type) != TYPE_UNQUALIFIED) + if (cp_type_quals (type) != TYPE_UNQUALIFIED) unqualified_variant = build_ptrmemfunc_type (TYPE_MAIN_VARIANT (type)); @@ -9229,9 +9228,9 @@ build_ptrmemfunc_type (type) type, set the TYPE_MAIN_VARIANT for this type to be the unqualified type. Since they are actually RECORD_TYPEs that are not variants of each other, we must do this manually. */ - if (CP_TYPE_QUALS (type) != TYPE_UNQUALIFIED) + if (cp_type_quals (type) != TYPE_UNQUALIFIED) { - t = build_qualified_type (t, CP_TYPE_QUALS (type)); + t = build_qualified_type (t, cp_type_quals (type)); TYPE_MAIN_VARIANT (t) = unqualified_variant; TYPE_NEXT_VARIANT (t) = TYPE_NEXT_VARIANT (unqualified_variant); TYPE_NEXT_VARIANT (unqualified_variant) = t; @@ -10159,7 +10158,7 @@ grokdeclarator (declarator, declspecs, decl_context, initialized, attrlist) { RIDBIT_RESET (RID_LONG, specbits); type = build_qualified_type (long_double_type_node, - CP_TYPE_QUALS (type)); + cp_type_quals (type)); } /* Check all other uses of type modifiers. */ @@ -11129,7 +11128,7 @@ grokdeclarator (declarator, declspecs, decl_context, initialized, attrlist) && TYPE_NAME (type) && TREE_CODE (TYPE_NAME (type)) == TYPE_DECL && TYPE_ANONYMOUS_P (type) - && CP_TYPE_QUALS (type) == TYPE_UNQUALIFIED) + && cp_type_quals (type) == TYPE_UNQUALIFIED) { tree oldname = TYPE_NAME (type); tree t; @@ -13539,7 +13538,7 @@ start_function (declspecs, declarator, attrs, flags) { DECL_RESULT (decl1) = build_decl (RESULT_DECL, 0, TYPE_MAIN_VARIANT (restype)); - c_apply_type_quals_to_decl (CP_TYPE_QUALS (restype), + c_apply_type_quals_to_decl (cp_type_quals (restype), DECL_RESULT (decl1)); } } @@ -14469,14 +14468,14 @@ revert_static_member_fn (decl) tree function = TREE_TYPE (decl); tree args = TYPE_ARG_TYPES (function); - if (CP_TYPE_QUALS (TREE_TYPE (TREE_VALUE (args))) + if (cp_type_quals (TREE_TYPE (TREE_VALUE (args))) != TYPE_UNQUALIFIED) cp_error ("static member function `%#D' declared with type qualifiers", decl); args = TREE_CHAIN (args); tmp = build_function_type (TREE_TYPE (function), args); - tmp = build_qualified_type (tmp, CP_TYPE_QUALS (function)); + tmp = build_qualified_type (tmp, cp_type_quals (function)); tmp = build_exception_variant (tmp, TYPE_RAISES_EXCEPTIONS (function)); TREE_TYPE (decl) = tmp; |