]> git.ipfire.org Git - thirdparty/gcc.git/commit
gccrs: Handle link_name attribute
authorOwen Avery <powerboat9.gamer@gmail.com>
Sun, 14 Sep 2025 20:57:49 +0000 (16:57 -0400)
committerArthur Cohen <arthur.cohen@embecosm.com>
Thu, 30 Oct 2025 20:30:53 +0000 (21:30 +0100)
commit0c714ad621154c6b746712c7f64ead0628f67b0f
tree95e4bf5040e32b97e3719a313a9fa223b50c07e5
parent955c7b66d73c1c9481dabb4ed93165c451ba0511
gccrs: Handle link_name attribute

gcc/rust/ChangeLog:

* backend/rust-compile-extern.h: Add includes.
(CompileExternItem::visit): Use get_link_name.
(CompileExternItem::get_link_name): New static member function.
* util/rust-attribute-values.h (Attributes::LINK_NAME): New
static constexpr member variable.
* util/rust-attributes.cc (__definitions): New entry for
LINK_NAME.
* util/rust-ggc.cc: Include "rust-ast.h".
(Ident::Ident): Add overload for Rust::Identifier.
* util/rust-ggc.h (class Identifier): Forward declare.
(Ident::Ident): Add overload for Rust::Identifier.

gcc/testsuite/ChangeLog:

* rust/execute/torture/link-name.rs: New test.

Signed-off-by: Owen Avery <powerboat9.gamer@gmail.com>
gcc/rust/backend/rust-compile-extern.h
gcc/rust/util/rust-attribute-values.h
gcc/rust/util/rust-attributes.cc
gcc/rust/util/rust-ggc.cc
gcc/rust/util/rust-ggc.h
gcc/testsuite/rust/execute/torture/link-name.rs [new file with mode: 0644]