aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathan Sidwell <nathan@acm.org>2020-11-02 08:43:17 -0800
committerNathan Sidwell <nathan@acm.org>2020-11-02 08:56:39 -0800
commit9a2e765d7773185efa109c12839ab6c8a18a1346 (patch)
treef2bbbd02bd3825a400b6fc2323463318f7b2d762
parentf8a737930bb0bd0714970cf04ea0463fddb5c6ef (diff)
downloadgcc-9a2e765d7773185efa109c12839ab6c8a18a1346.zip
gcc-9a2e765d7773185efa109c12839ab6c8a18a1346.tar.gz
gcc-9a2e765d7773185efa109c12839ab6c8a18a1346.tar.bz2
core: id_equal should forward
I noticed the two id_equal functions directly called strcmp. This changes one of them to call the other with args swapped. gcc/ * tree.h (id_equal): Call the symetric predicate with swapped arguments.
-rw-r--r--gcc/tree.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/tree.h b/gcc/tree.h
index 04e564c..caf6287 100644
--- a/gcc/tree.h
+++ b/gcc/tree.h
@@ -3859,7 +3859,7 @@ id_equal (const_tree id, const char *str)
inline bool
id_equal (const char *str, const_tree id)
{
- return !strcmp (str, IDENTIFIER_POINTER (id));
+ return id_equal (id, str);
}
/* Return the number of elements in the VECTOR_TYPE given by NODE. */