Commit e3d444a7 by Kyrylo Tkachov Committed by Kyrylo Tkachov

[arm] Fix assembler option rewrite alphabetical comparison

	* common/config/arm/arm-common.c (compare_opt_names): Add function
	comment.  Use strcmp instead of manual loop.

From-SVN: r255942
parent bb5307a6
2017-12-21 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
* common/config/arm/arm-common.c (compare_opt_names): Add function
comment. Use strcmp instead of manual loop.
2017-12-21 Martin Liska <mliska@suse.cz>
PR gcov-profile/83509
......@@ -116,14 +116,14 @@ arm_rewrite_mcpu (int argc, const char **argv)
return arm_rewrite_selected_cpu (argv[argc - 1]);
}
/* Comparator for arm_rewrite_selected_arch. Compare the two arch extension
strings FIRST and SECOND and return TRUE if FIRST is less than SECOND
alphabetically. */
static bool
compare_opt_names (const char *first, const char *second)
{
for (int i = 0; ; i++)
if (first[i] == 0
|| first[i] < second[i])
return true;
return false;
return strcmp (first, second) <= 0;
}
/* Rewrite the architecture string for passing to the assembler.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment