symver: fix attribute matching.

gcc/ChangeLog:

	* cgraphunit.c (process_symver_attribute): Match only symver
	TREE_PURPOSE.
This commit is contained in:
Martin Liska 2020-08-26 13:18:14 +02:00
parent e9a2b5b8a3
commit 2236c45479

View File

@ -727,6 +727,9 @@ process_symver_attribute (symtab_node *n)
.symver foo, bar@V1
.symver foo, baz@V2
*/
const char *purpose = IDENTIFIER_POINTER (TREE_PURPOSE (value));
if (strcmp (purpose, "symver") != 0)
continue;
tree symver = get_identifier_with_length
(TREE_STRING_POINTER (TREE_VALUE (TREE_VALUE (value))),