]> git.ipfire.org Git - thirdparty/gcc.git/commit
Add get_clone_versions and get_target_version functions.
authorAlfie Richards <alfie.richards@arm.com>
Fri, 31 Jan 2025 10:51:14 +0000 (10:51 +0000)
committerAlfie Richards <alfie.richards@arm.com>
Wed, 16 Jul 2025 09:04:31 +0000 (09:04 +0000)
commit13604c5bdca81e1f3e4baa3a348eaec986a8f447
treeeb5e615aad78ed7794573a5719def150abe75883
parent869485d7f364f436bab8c8954e20c7779d234690
Add get_clone_versions and get_target_version functions.

This is a reimplementation of get_target_clone_attr_len,
get_attr_str, and separate_attrs using string_slice and auto_vec to make
memory management and use simpler.

Adds get_target_version helper function to get the target_version string
from a decl.

gcc/c-family/ChangeLog:

* c-attribs.cc (handle_target_clones_attribute): Change to use
get_clone_versions.

gcc/ChangeLog:

* tree.cc (get_clone_versions): New function.
(get_clone_attr_versions): New function.
(get_version): New function.
* tree.h (get_clone_versions): New function.
(get_clone_attr_versions): New function.
(get_target_version): New function.
gcc/c-family/c-attribs.cc
gcc/tree.cc
gcc/tree.h