Skip to content

Commit

Permalink
Revert "gcc/rust/ChangeLog:"
Browse files Browse the repository at this point in the history
This reverts commit 600fd80.
  • Loading branch information
CohenArthur committed Jan 10, 2025
1 parent aa8d698 commit 5db9ab5
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 11 deletions.
7 changes: 6 additions & 1 deletion gcc/rust/ast/rust-collect-lang-items.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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 ());
Expand Down
8 changes: 0 additions & 8 deletions gcc/rust/util/rust-attributes.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
2 changes: 0 additions & 2 deletions gcc/rust/util/rust-attributes.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5db9ab5

Please sign in to comment.