diff options
author | Arthur Cohen <arthur.cohen@embecosm.com> | 2024-12-04 13:53:11 +0000 |
---|---|---|
committer | CohenArthur <arthur.cohen@embecosm.com> | 2024-12-04 17:39:53 +0000 |
commit | 72081086d6b8228f7db6526e39e41bea2eae244c (patch) | |
tree | cffdb8fed5c0679a7e39b3c3e4df2ed2a15ff429 /gcc/rust/util/rust-attributes.h | |
parent | 6b7e055ecc9a83295cb1f6cd7bb58f3270f2cd0c (diff) | |
download | gcc-72081086d6b8228f7db6526e39e41bea2eae244c.zip gcc-72081086d6b8228f7db6526e39e41bea2eae244c.tar.gz gcc-72081086d6b8228f7db6526e39e41bea2eae244c.tar.bz2 |
attributes: Add class for sharing methods on attributes.
gcc/rust/ChangeLog:
* util/rust-attributes.h (class Attributes): New.
* util/rust-attributes.cc: Implement Attributes::is_known().
* ast/rust-collect-lang-items.cc (is_known_attribute): Remove.
(get_lang_item_attr): Call Attributes::is_known() instead.
* hir/rust-ast-lower-base.cc (ASTLoweringBase::handle_outer_attributes): Likewise.
(ASTLoweringBase::is_known_attribute): Remove.
Diffstat (limited to 'gcc/rust/util/rust-attributes.h')
-rw-r--r-- | gcc/rust/util/rust-attributes.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/rust/util/rust-attributes.h b/gcc/rust/util/rust-attributes.h index f557b2d..c341b3e 100644 --- a/gcc/rust/util/rust-attributes.h +++ b/gcc/rust/util/rust-attributes.h @@ -25,6 +25,12 @@ namespace Rust { namespace Analysis { +class Attributes +{ +public: + static bool is_known (const std::string &attribute_path); +}; + enum CompilerPass { UNKNOWN, |