diff options
| author | CohenArthur <cohenarthur.dev@gmail.com> | 2025-01-10 15:26:39 +0100 |
|---|---|---|
| committer | Arthur Cohen <arthur.cohen@embecosm.com> | 2025-03-21 12:56:57 +0100 |
| commit | 29367fe699afe6a385e311b90f9c3850b19744ac (patch) | |
| tree | 1d5a3a6e784629258dc6d520ef246cde9b937952 /gcc | |
| parent | 36ac388bf967a820c8cfc43191fc352ac917f97a (diff) | |
| download | gcc-29367fe699afe6a385e311b90f9c3850b19744ac.zip gcc-29367fe699afe6a385e311b90f9c3850b19744ac.tar.gz gcc-29367fe699afe6a385e311b90f9c3850b19744ac.tar.bz2 | |
gccrs: Revert "gcc/rust/ChangeLog:"
This reverts commit 600fd806b8821ea24103ea0f31d666077245c6b7.
Diffstat (limited to 'gcc')
| -rw-r--r-- | gcc/rust/ast/rust-collect-lang-items.cc | 7 | ||||
| -rw-r--r-- | gcc/rust/util/rust-attributes.cc | 8 | ||||
| -rw-r--r-- | gcc/rust/util/rust-attributes.h | 2 |
3 files changed, 6 insertions, 11 deletions
diff --git a/gcc/rust/ast/rust-collect-lang-items.cc b/gcc/rust/ast/rust-collect-lang-items.cc index ec6919d..50d134a 100644 --- a/gcc/rust/ast/rust-collect-lang-items.cc +++ b/gcc/rust/ast/rust-collect-lang-items.cc @@ -40,7 +40,12 @@ get_lang_item_attr (const T &maybe_lang_item) continue; } - if (Analysis::Attributes::is_lang_item (str_path, attr)) + bool is_lang_item = str_path == Values::Attributes::LANG + && attr.has_attr_input () + && attr.get_attr_input ().get_attr_input_type () + == AST::AttrInput::AttrInputType::LITERAL; + + if (is_lang_item) { auto &literal = static_cast<AST::AttrInputLiteral &> (attr.get_attr_input ()); diff --git a/gcc/rust/util/rust-attributes.cc b/gcc/rust/util/rust-attributes.cc index 0234903..9f63234 100644 --- a/gcc/rust/util/rust-attributes.cc +++ b/gcc/rust/util/rust-attributes.cc @@ -37,14 +37,6 @@ Attributes::is_known (const std::string &attribute_path) return !lookup.is_error (); } -bool -Attributes::is_lang_item (const std::string &attribute_path, - const AST::Attribute &attr) -{ - return ((attribute_path == Values::Attributes::LANG) && attr.has_attr_input () - && (attr.get_attr_input ().get_attr_input_type () - == AST::AttrInput::AttrInputType::LITERAL)); -} using Attrs = Values::Attributes; diff --git a/gcc/rust/util/rust-attributes.h b/gcc/rust/util/rust-attributes.h index 30f9eef..c928c8e 100644 --- a/gcc/rust/util/rust-attributes.h +++ b/gcc/rust/util/rust-attributes.h @@ -29,8 +29,6 @@ class Attributes { public: static bool is_known (const std::string &attribute_path); - static bool is_lang_item (const std::string &attribute_path, - const AST::Attribute &attr); }; enum CompilerPass |
