summaryrefslogtreecommitdiff
path: root/gcc/genattrtab.c
diff options
context:
space:
mode:
authoraj <aj@138bc75d-0d04-0410-961f-82ee72b054a4>2003-07-05 11:23:01 +0000
committeraj <aj@138bc75d-0d04-0410-961f-82ee72b054a4>2003-07-05 11:23:01 +0000
commitd0abb70195ab3bf04deafad7c5504f2ca267736e (patch)
treed15ef9a5b1d57584e24690ce03a860ec3d006db7 /gcc/genattrtab.c
parent2492b9c7a2d5978c0e00d85c99a1ffb8101697b0 (diff)
downloadgcc-d0abb70195ab3bf04deafad7c5504f2ca267736e.tar.gz
* genattrtab.c (write_attr_get): Revert part of last patch to
always write out a prototype. * genemit.c (gen_split): Readd lost unused attributes in last patch. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@68967 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/genattrtab.c')
-rw-r--r--gcc/genattrtab.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/gcc/genattrtab.c b/gcc/genattrtab.c
index 990cb0e70f9..a4f6e267f02 100644
--- a/gcc/genattrtab.c
+++ b/gcc/genattrtab.c
@@ -4765,6 +4765,21 @@ write_attr_get (struct attr_desc *attr)
switch we will generate. */
common_av = find_most_used (attr);
+ /* Write out prototype of function. */
+ if (!attr->is_numeric)
+ printf ("extern enum attr_%s ", attr->name);
+ else if (attr->unsigned_p)
+ printf ("extern unsigned int ");
+ else
+ printf ("extern int ");
+ /* If the attribute name starts with a star, the remainder is the name of
+ the subroutine to use, instead of `get_attr_...'. */
+ if (attr->name[0] == '*')
+ printf ("%s (rtx);\n", &attr->name[1]);
+ else
+ printf ("get_attr_%s (%s);\n", attr->name,
+ (attr->is_const ? "void" : "rtx"));
+
/* Write out start of function, then all values with explicit `case' lines,
then a `default', then the value with the most uses. */
if (!attr->is_numeric)