aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/ast
diff options
context:
space:
mode:
authorOm Swaroop Nayak <96killerat96@gmail.com>2025-01-01 09:02:02 -0800
committerPhilip Herron <philip.herron@embecosm.com>2025-01-10 12:34:55 +0000
commit600fd806b8821ea24103ea0f31d666077245c6b7 (patch)
tree7aad84aa0661bc1b8701e177a11d2ed9c12400b4 /gcc/rust/ast
parentc957f18575fbe8208e01674cd446652323a7eb1b (diff)
downloadgcc-600fd806b8821ea24103ea0f31d666077245c6b7.zip
gcc-600fd806b8821ea24103ea0f31d666077245c6b7.tar.gz
gcc-600fd806b8821ea24103ea0f31d666077245c6b7.tar.bz2
gcc/rust/ChangeLog:
* ast/rust-collect-lang-items.cc (get_lang_item_attr): "removed checker fn" * util/rust-attributes.cc (Attributes::is_lang_item): "added fn" * util/rust-attributes.h: "added fn" Signed-off-by: Om Swaroop Nayak <96killerat96@gmail.com>
Diffstat (limited to 'gcc/rust/ast')
-rw-r--r--gcc/rust/ast/rust-collect-lang-items.cc7
1 files changed, 1 insertions, 6 deletions
diff --git a/gcc/rust/ast/rust-collect-lang-items.cc b/gcc/rust/ast/rust-collect-lang-items.cc
index 50d134a..ec6919d 100644
--- a/gcc/rust/ast/rust-collect-lang-items.cc
+++ b/gcc/rust/ast/rust-collect-lang-items.cc
@@ -40,12 +40,7 @@ get_lang_item_attr (const T &maybe_lang_item)
continue;
}
- 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)
+ if (Analysis::Attributes::is_lang_item (str_path, attr))
{
auto &literal
= static_cast<AST::AttrInputLiteral &> (attr.get_attr_input ());