]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
gccrs: Revert "gcc/rust/ChangeLog:"
authorCohenArthur <cohenarthur.dev@gmail.com>
Fri, 10 Jan 2025 14:26:39 +0000 (15:26 +0100)
committerArthur Cohen <arthur.cohen@embecosm.com>
Fri, 21 Mar 2025 11:56:57 +0000 (12:56 +0100)
This reverts commit 600fd806b8821ea24103ea0f31d666077245c6b7.

gcc/rust/ast/rust-collect-lang-items.cc
gcc/rust/util/rust-attributes.cc
gcc/rust/util/rust-attributes.h

index ec6919dca14ecf6dfd5f91b724e2bd68c7c0a95f..50d134a429f514171f0845cce8d8919adf7dd0c7 100644 (file)
@@ -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 ());
index 0234903ba58572feb6178e2bf51de28aa2295110..9f63234112c5b3a68ea32df6217931d02f25c054 100644 (file)
@@ -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;
 
index 30f9eef213bc5eff71c5a5bf61d461da8ae47222..c928c8eb9d2629bb01a9d85b8290d77d2e9ad9f4 100644 (file)
@@ -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