diff options
Diffstat (limited to 'libcpp/init.c')
-rw-r--r-- | libcpp/init.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/libcpp/init.c b/libcpp/init.c index c21121707d3..aef39981792 100644 --- a/libcpp/init.c +++ b/libcpp/init.c @@ -381,6 +381,24 @@ mark_named_operators (cpp_reader *pfile) } } +/* Helper function of cpp_type2name. Return the string associated with + named operator TYPE. */ +const char * +cpp_named_operator2name (enum cpp_ttype type) +{ + const struct builtin_operator *b; + + for (b = operator_array; + b < (operator_array + ARRAY_SIZE (operator_array)); + b++) + { + if (type == b->value) + return (const char *) b->name; + } + + return NULL; +} + void cpp_init_special_builtins (cpp_reader *pfile) { |