aboutsummaryrefslogtreecommitdiff
path: root/gcc/read-md.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/read-md.c')
-rw-r--r--gcc/read-md.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/read-md.c b/gcc/read-md.c
index 90707b3..9c62291 100644
--- a/gcc/read-md.c
+++ b/gcc/read-md.c
@@ -847,6 +847,14 @@ handle_enum (int lineno, bool md_p)
}
}
+/* Try to find the definition of the given enum. Return null on failure. */
+
+struct enum_type *
+lookup_enum_type (const char *name)
+{
+ return (struct enum_type *) htab_find (enum_types, &name);
+}
+
/* For every enum definition, call CALLBACK with two arguments:
a pointer to the constant definition and INFO. Stop when CALLBACK
returns zero. */