From: Ziemowit Laski Date: Wed, 25 Aug 2004 23:39:11 +0000 (+0000) Subject: c-decl.c (grokparm): New function. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c34be55ec57157e7607728b303ba74a913cfc79f;p=gcc.git c-decl.c (grokparm): New function. [gcc/ChangeLog] 2004-08-25 Ziemowit Laski * c-decl.c (grokparm): New function. * c-tree.h (grokparm): New prototype. From-SVN: r86587 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 7229f5a6e25..7770a07a8dc 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2004-08-25 Ziemowit Laski + + * c-decl.c (grokparm): New function. + * c-tree.h (grokparm): New prototype. + 2004-08-25 Andrew MacLeod * tree-ssa-operands.h (struct ssa_operand_iterator_d): New. SSA operand diff --git a/gcc/c-decl.c b/gcc/c-decl.c index e9a9036e5ee..6630d9a3488 100644 --- a/gcc/c-decl.c +++ b/gcc/c-decl.c @@ -3153,6 +3153,20 @@ finish_decl (tree decl, tree init, tree asmspec_tree) } } +/* Given a parsed parameter declaration, decode it into a PARM_DECL. */ + +tree +grokparm (tree parm) +{ + tree decl = grokdeclarator (TREE_VALUE (TREE_PURPOSE (parm)), + TREE_PURPOSE (TREE_PURPOSE (parm)), + PARM, false, NULL); + + decl_attributes (&decl, TREE_VALUE (parm), 0); + + return decl; +} + /* Given a parsed parameter declaration, decode it into a PARM_DECL and push that on the current scope. */ diff --git a/gcc/c-tree.h b/gcc/c-tree.h index 41abd262968..5c99f47aa0e 100644 --- a/gcc/c-tree.h +++ b/gcc/c-tree.h @@ -180,6 +180,7 @@ extern tree get_parm_info (bool); extern tree grokfield (tree, tree, tree); extern tree groktypename (tree); extern tree groktypename_in_parm_context (tree); +extern tree grokparm (tree); extern tree implicitly_declare (tree); extern void keep_next_level (void); extern tree lookup_name (tree);