]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - gcc/tree.h
tree.h (id_equal): New.
[thirdparty/gcc.git] / gcc / tree.h
index 7de1a7777434e0d25c1bfd3b16ae60f70dc2733b..bfe83f7c0a2803b554d8c5f4c86ac0ecc8184393 100644 (file)
@@ -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]