diff options
author | Arthur Cohen <arthur.cohen@embecosm.com> | 2025-01-03 15:45:57 +0000 |
---|---|---|
committer | Arthur Cohen <arthur.cohen@embecosm.com> | 2025-03-21 12:56:57 +0100 |
commit | 1d0be889267e3b3c58d97148640c0d46bc19253e (patch) | |
tree | 78e4c5ae4585bd9977ebc656494bbc60f63e803e /gcc | |
parent | 592540266306438fe61e8951cfc2df577dcf2112 (diff) | |
download | gcc-1d0be889267e3b3c58d97148640c0d46bc19253e.zip gcc-1d0be889267e3b3c58d97148640c0d46bc19253e.tar.gz gcc-1d0be889267e3b3c58d97148640c0d46bc19253e.tar.bz2 |
gccrs: attributes: Add #[derive] as a built-in attribute
gcc/rust/ChangeLog:
* util/rust-attribute-values.h: Declare new attribute value.
* util/rust-attributes.cc: Use it.
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/rust/util/rust-attribute-values.h | 1 | ||||
-rw-r--r-- | gcc/rust/util/rust-attributes.cc | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/gcc/rust/util/rust-attribute-values.h b/gcc/rust/util/rust-attribute-values.h index ef01e67..9ef5cc5 100644 --- a/gcc/rust/util/rust-attribute-values.h +++ b/gcc/rust/util/rust-attribute-values.h @@ -29,6 +29,7 @@ public: static constexpr auto &COLD = "cold"; static constexpr auto &CFG = "cfg"; static constexpr auto &CFG_ATTR = "cfg_attr"; + static constexpr auto &DERIVE_ATTR = "derive"; static constexpr auto &DEPRECATED = "deprecated"; static constexpr auto &ALLOW = "allow"; static constexpr auto &ALLOW_INTERNAL_UNSTABLE = "allow_internal_unstable"; diff --git a/gcc/rust/util/rust-attributes.cc b/gcc/rust/util/rust-attributes.cc index 9f63234..03452c7 100644 --- a/gcc/rust/util/rust-attributes.cc +++ b/gcc/rust/util/rust-attributes.cc @@ -46,6 +46,7 @@ static const BuiltinAttrDefinition __definitions[] {Attrs::COLD, CODE_GENERATION}, {Attrs::CFG, EXPANSION}, {Attrs::CFG_ATTR, EXPANSION}, + {Attrs::DERIVE_ATTR, EXPANSION}, {Attrs::DEPRECATED, STATIC_ANALYSIS}, {Attrs::ALLOW, STATIC_ANALYSIS}, {Attrs::ALLOW_INTERNAL_UNSTABLE, STATIC_ANALYSIS}, |