diff options
author | Marc Poulhiès <dkm@kataplop.net> | 2025-05-09 11:09:58 +0200 |
---|---|---|
committer | Marc Poulhiès <dkm@kataplop.net> | 2025-05-09 18:47:19 +0000 |
commit | 0d563507555c48d184059e9d8e4e58fec36a9e53 (patch) | |
tree | 5eee4fcb9e7143749386a34e232a80b6918b8392 /gcc/tree-streamer-in.c | |
parent | d90770b53854d6b81e1912a205aeffdd9bfc4078 (diff) | |
download | gcc-devel/rust/master.zip gcc-devel/rust/master.tar.gz gcc-devel/rust/master.tar.bz2 |
gccrs: Adapt attribute lang hook and do some cleanupdevel/rust/master
Since r14-6076, the LANG_HOOKS_COMMON_ATTRIBUTE_TABLE should not be used and
LANG_HOOKS_ATTRIBUTE_TABLE replaces it.
Add the "cold" attribute to fix PR120018 (and the matching "hot" attribute).
Replace some gcc_assert() by explicit warnings (same as D frontend).
Add some clang-format off/on comment around code that's not correctly
formatted.
gcc/rust/ChangeLog:
PR rust/120018
* rust-attribs.cc (handle_noreturn_attribute): Reindent declaration.
(handle_leaf_attribute): Likewise.
(handle_const_attribute): Likewise.
(handle_malloc_attribute): Likewise.
(handle_pure_attribute): Likewise.
(handle_novops_attribute): Likewise.
(handle_nonnull_attribute): Likewise.
(handle_nothrow_attribute): Likewise.
(handle_type_generic_attribute): Likewise.
(handle_transaction_pure_attribute): Likewise.
(handle_returns_twice_attribute): Likewise.
(handle_fnspec_attribute): Likewise.
(handle_omp_declare_simd_attribute): Likewise.
(handle_cold_attribute): New.
(handle_hot_attribute): New.
(attribute_spec::exclusions attr_cold_hot_exclusions): New.
(grs_langhook_common_attributes): Make it static.
(grs_langhook_common_attribute_table): New.
(grs_langhook_gnu_attributes): New.
(grs_langhook_gnu_attribute_table): New.
(handle_malloc_attribute): Make it static.
(handle_fnspec_attribute): Likewise.
(handle_pure_attribute): Replace gcc_assert by explicit warning.
(handle_novops_attribute): Likewise.
(handle_nothrow_attribute): Likewise.
(handle_returns_twice_attribute): Likewise.
(handle_omp_declare_simd_attribute): Likewise and make it static.
* rust-lang.cc (grs_langhook_gnu_attribute_table): New.
(grs_langhook_common_attribute_table): Adjust type to new hook.
(LANG_HOOKS_COMMON_ATTRIBUTE_TABLE): Remove.
(LANG_HOOKS_ATTRIBUTE_TABLE): New.
Signed-off-by: Marc Poulhiès <dkm@kataplop.net>
Diffstat (limited to 'gcc/tree-streamer-in.c')
0 files changed, 0 insertions, 0 deletions