aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/util/rust-attributes.cc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/rust/util/rust-attributes.cc')
-rw-r--r--gcc/rust/util/rust-attributes.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/rust/util/rust-attributes.cc b/gcc/rust/util/rust-attributes.cc
index 45ebf8c..1a66be2 100644
--- a/gcc/rust/util/rust-attributes.cc
+++ b/gcc/rust/util/rust-attributes.cc
@@ -37,6 +37,14 @@ 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;