]> git.ipfire.org Git - thirdparty/gcc.git/commit
gccrs: Change ABI setup and add gccrs_proc_macro attr
authorPierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
Mon, 4 Sep 2023 12:23:10 +0000 (14:23 +0200)
committerArthur Cohen <arthur.cohen@embecosm.com>
Tue, 16 Jan 2024 18:09:30 +0000 (19:09 +0100)
commit193b0780d55c6ee93cb4a677e6bacf8c1da87021
tree932e42d35f232de335c4eff725cb3614720af10e
parentce7688d7b0c0b4940adb2b08908df5b2b0ca702e
gccrs: Change ABI setup and add gccrs_proc_macro attr

Change the way the ABI is setup on a function to avoid duplicates. ABI
is setup by the setup function only now. Add a new attribute to the
function "gccrs_proc_macro" in order to differentiate it from another
type of function.

gcc/rust/ChangeLog:

* backend/rust-compile-base.cc (handle_proc_macro_common): Add
new attribute "gccrs_proc_macro" to all procedural macro
functions.
(get_abi): Add a function to retrieve the correct ABI depending
on wether the function is a proc macro or not.

Signed-off-by: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
gcc/rust/backend/rust-compile-base.cc