public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r13-6175] gccrs: Add mappings for fn_once lang item
@ 2023-02-21 11:57 Arthur Cohen
  0 siblings, 0 replies; only message in thread
From: Arthur Cohen @ 2023-02-21 11:57 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:f49e252824131e2c31de372d3155a458415bbe98

commit r13-6175-gf49e252824131e2c31de372d3155a458415bbe98
Author: Philip Herron <philip.herron@embecosm.com>
Date:   Wed Oct 12 12:25:52 2022 +0100

    gccrs: Add mappings for fn_once lang item
    
    gcc/rust/ChangeLog:
    
            * util/rust-lang-item.h: Add `fn_once` lang item.

Diff:
---
 gcc/rust/util/rust-lang-item.h | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/gcc/rust/util/rust-lang-item.h b/gcc/rust/util/rust-lang-item.h
index 4d9dc8a3d3a..c7e0e5c811d 100644
--- a/gcc/rust/util/rust-lang-item.h
+++ b/gcc/rust/util/rust-lang-item.h
@@ -73,6 +73,9 @@ public:
     MUT_PTR,
     CONST_SLICE_PTR,
 
+    // functions
+    FN_ONCE,
+
     UNKNOWN,
   };
 
@@ -218,6 +221,10 @@ public:
       {
 	return ItemType::CONST_SLICE_PTR;
       }
+    else if (item.compare ("fn_once") == 0)
+      {
+	return ItemType::FN_ONCE;
+      }
 
     return ItemType::UNKNOWN;
   }
@@ -296,6 +303,8 @@ public:
 	return "mut_ptr";
       case CONST_SLICE_PTR:
 	return "const_slice_ptr";
+      case FN_ONCE:
+	return "fn_once";
 
       case UNKNOWN:
 	return "<UNKNOWN>";

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-02-21 11:57 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-21 11:57 [gcc r13-6175] gccrs: Add mappings for fn_once lang item Arthur Cohen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).