-
Notifications
You must be signed in to change notification settings - Fork 192
Handle link_name attribute
#4031
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Fixes #3867 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is partly there but there is special handling for the function declarations in: ust-compile-extern.h: void visit (HIR::ExternalFunctionItem &function) override
|
Also you should put the Fixes into the commit message too since this is almost it finished |
|
Now depends on #4044 |
c7cba22 to
a4c28b5
Compare
|
It looks like |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small nit otherwise LGTM
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 <[email protected]>
a4c28b5 to
1cbccdd
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Unless I'm mistaken, we don't need to put
no_mangleinDECL_ATTRIBUTES (fndecl), right? Since we do all of the mangling, and gcc doesn't seem to have ano_mangleattribute?