diff options
author | Arthur Cohen <arthur.cohen@embecosm.com> | 2025-07-04 16:19:44 +0200 |
---|---|---|
committer | Arthur Cohen <arthur.cohen@embecosm.com> | 2025-08-05 16:36:55 +0200 |
commit | cf8a078221d14c8d2cb16dfb4448ec121eb50d1a (patch) | |
tree | 6004772070e8b75e1284c1c207bd0c6994ed71e0 | |
parent | 65b8519344ef2eb5f6bbd6890aaf324db76677db (diff) | |
download | gcc-cf8a078221d14c8d2cb16dfb4448ec121eb50d1a.zip gcc-cf8a078221d14c8d2cb16dfb4448ec121eb50d1a.tar.gz gcc-cf8a078221d14c8d2cb16dfb4448ec121eb50d1a.tar.bz2 |
gccrs: attributes: Add #[test] and #[simd_test]
gcc/rust/ChangeLog:
* util/rust-attribute-values.h: Add declarations for them.
* util/rust-attributes.cc: Add definitions.
-rw-r--r-- | gcc/rust/util/rust-attribute-values.h | 4 | ||||
-rw-r--r-- | gcc/rust/util/rust-attributes.cc | 5 |
2 files changed, 8 insertions, 1 deletions
diff --git a/gcc/rust/util/rust-attribute-values.h b/gcc/rust/util/rust-attribute-values.h index 47e6a17..09ef566 100644 --- a/gcc/rust/util/rust-attribute-values.h +++ b/gcc/rust/util/rust-attribute-values.h @@ -85,6 +85,10 @@ public: static constexpr auto &NON_EXHAUSTIVE = "non_exhaustive"; static constexpr auto &RUSTFMT = "rustfmt"; + + static constexpr auto &TEST = "test"; + + static constexpr auto &SIMD_TEST = "simd_test"; }; } // namespace Values } // namespace Rust diff --git a/gcc/rust/util/rust-attributes.cc b/gcc/rust/util/rust-attributes.cc index 9bf4f77..0c957fb 100644 --- a/gcc/rust/util/rust-attributes.cc +++ b/gcc/rust/util/rust-attributes.cc @@ -95,7 +95,10 @@ static const BuiltinAttrDefinition __definitions[] {Attrs::FUNDAMENTAL, TYPE_CHECK}, {Attrs::NON_EXHAUSTIVE, TYPE_CHECK}, - {Attrs::RUSTFMT, EXTERNAL}}; + {Attrs::RUSTFMT, EXTERNAL}, + + {Attrs::TEST, CODE_GENERATION}, + {Attrs::SIMD_TEST, CODE_GENERATION}}; BuiltinAttributeMappings * BuiltinAttributeMappings::get () |