aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorOwen Avery <powerboat9.gamer@gmail.com>2023-04-03 18:52:23 -0400
committerArthur Cohen <arthur.cohen@embecosm.com>2024-01-16 18:28:43 +0100
commit8bc2a3e40e86a6a125c985f05616537c130cb2cb (patch)
tree1604a60abb00054b43502b77db4f01ed8f9c369a /gcc
parentbdb4e2930ecbb96289819833c495ac59214b38b5 (diff)
downloadgcc-8bc2a3e40e86a6a125c985f05616537c130cb2cb.zip
gcc-8bc2a3e40e86a6a125c985f05616537c130cb2cb.tar.gz
gcc-8bc2a3e40e86a6a125c985f05616537c130cb2cb.tar.bz2
gccrs: Handle "fn" and "fn_mut" lang items
gcc/rust/ChangeLog: * util/rust-lang-item.h (RustLangItem::ItemType::FN): Add. (RustLangItem::ItemType::FN_MUT): Add. (RustLangItem::Parse): Handle FN and FN_MUT. (RustLangItem::ToString): Handle FN and FN_MUT. Signed-off-by: Owen Avery <powerboat9.gamer@gmail.com>
Diffstat (limited to 'gcc')
-rw-r--r--gcc/rust/util/rust-lang-item.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/gcc/rust/util/rust-lang-item.h b/gcc/rust/util/rust-lang-item.h
index d7f6ad1..86323d9 100644
--- a/gcc/rust/util/rust-lang-item.h
+++ b/gcc/rust/util/rust-lang-item.h
@@ -72,6 +72,8 @@ public:
PHANTOM_DATA,
// functions
+ FN,
+ FN_MUT,
FN_ONCE,
FN_ONCE_OUTPUT,
@@ -252,6 +254,14 @@ public:
{
return ItemType::PHANTOM_DATA;
}
+ else if (item.compare ("fn") == 0)
+ {
+ return ItemType::FN;
+ }
+ else if (item.compare ("fn_mut") == 0)
+ {
+ return ItemType::FN_MUT;
+ }
else if (item.compare ("fn_once") == 0)
{
return ItemType::FN_ONCE;
@@ -462,6 +472,10 @@ public:
return "RangeToInclusive";
case PHANTOM_DATA:
return "phantom_data";
+ case FN:
+ return "fn";
+ case FN_MUT:
+ return "fn_mut";
case FN_ONCE:
return "fn_once";
case FN_ONCE_OUTPUT: