aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree.h
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/tree.h')
-rw-r--r--gcc/tree.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/gcc/tree.h b/gcc/tree.h
index 7de1a77..bfe83f7 100644
--- a/gcc/tree.h
+++ b/gcc/tree.h
@@ -3618,6 +3618,20 @@ tree_operand_check_code (const_tree __t, enum tree_code __code, int __i,
#endif
+/* True iff an identifier matches a C string. */
+
+inline bool
+id_equal (const_tree id, const char *str)
+{
+ return !strcmp (IDENTIFIER_POINTER (id), str);
+}
+
+inline bool
+id_equal (const char *str, const_tree id)
+{
+ return !strcmp (str, IDENTIFIER_POINTER (id));
+}
+
#define error_mark_node global_trees[TI_ERROR_MARK]
#define intQI_type_node global_trees[TI_INTQI_TYPE]