-
Notifications
You must be signed in to change notification settings - Fork 164
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add attributes support through LANG_HOOKS_COMMON_ATTRIBUTE_TABLE lang hook. Based on D frontend. gcc/rust/ChangeLog: * Make-lang.in (GRS_OBJS): Add rust-attribs.o. * backend/rust-builtins.cc (BuiltinsContext::define_function_type): Set builtin type to errormark so the builtin is considered unavailable. (BuiltinsContext::register_rust_mappings): Add all missing builtins. (builtin_const, builtin_noreturn, builtin_novops): Remove. * backend/rust-compile-intrinsic.cc (Intrinsics::compile): Add comment. (op_with_overflow_inner): Fix builtin name. (prefetch_data_handler): Adjust call. (uninit_handler): Likewise. (move_val_init_handler): Likewise. (expect_handler_inner): Likewise. * rust-lang.cc (grs_langhook_common_attribute_table): New. (LANG_HOOKS_COMMON_ATTRIBUTE_TABLE): Define. * rust-attribs.cc: New file. gcc/testsuite/ChangeLog: * rust/compile/torture/builtin_abort.rs: New test. * rust/execute/torture/builtin_abort.rs: New test. Signed-off-by: Marc Poulhiès <dkm@kataplop.net>
- Loading branch information
Showing
9 changed files
with
512 additions
and
82 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.