aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/sig.c
diff options
context:
space:
mode:
authorJason Merrill <jason@yorick.cygnus.com>1998-10-04 16:20:59 +0000
committerJason Merrill <jason@gcc.gnu.org>1998-10-04 12:20:59 -0400
commit14ae7e7d281f1b0cfc43f212362df64a923c2dda (patch)
tree8c099672f1f1eaf90391df57590c34b5e3b446bf /gcc/cp/sig.c
parent710afba434d439bccf7932fba2665119c844b196 (diff)
downloadgcc-14ae7e7d281f1b0cfc43f212362df64a923c2dda.zip
gcc-14ae7e7d281f1b0cfc43f212362df64a923c2dda.tar.gz
gcc-14ae7e7d281f1b0cfc43f212362df64a923c2dda.tar.bz2
decl.c (grokdeclarator): Remove redundant calls to build_type_variant and some duplicated code.
* decl.c (grokdeclarator): Remove redundant calls to build_type_variant and some duplicated code. * sig.c (build_signature_reference_type): Only take the type parm. (build_signature_pointer_type): Likewise. * tree.c (build_cplus_method_type): Adjust. * cp-tree.h: Update. From-SVN: r22820
Diffstat (limited to 'gcc/cp/sig.c')
-rw-r--r--gcc/cp/sig.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/gcc/cp/sig.c b/gcc/cp/sig.c
index e70ec3f..3580d4f 100644
--- a/gcc/cp/sig.c
+++ b/gcc/cp/sig.c
@@ -250,23 +250,25 @@ build_signature_pointer_or_reference_type (to_type, constp, volatilep, refp)
/* Construct, lay out and return the type of pointers to signature TO_TYPE. */
tree
-build_signature_pointer_type (to_type, constp, volatilep)
+build_signature_pointer_type (to_type)
tree to_type;
- int constp, volatilep;
{
return
- build_signature_pointer_or_reference_type (to_type, constp, volatilep, 0);
+ build_signature_pointer_or_reference_type (TYPE_MAIN_VARIANT (to_type),
+ TYPE_READONLY (to_type),
+ TYPE_VOLATILE (to_type), 0);
}
/* Construct, lay out and return the type of pointers to signature TO_TYPE. */
tree
-build_signature_reference_type (to_type, constp, volatilep)
+build_signature_reference_type (to_type)
tree to_type;
- int constp, volatilep;
{
return
- build_signature_pointer_or_reference_type (to_type, constp, volatilep, 1);
+ build_signature_pointer_or_reference_type (TYPE_MAIN_VARIANT (to_type),
+ TYPE_READONLY (to_type),
+ TYPE_VOLATILE (to_type), 1);
}
/* Return the name of the signature table (as an IDENTIFIER_NODE)