public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc/devel/rust/master] Add known lang item const_slice_ptr mappings
@ 2022-06-08 12:26 Thomas Schwinge
  0 siblings, 0 replies; only message in thread
From: Thomas Schwinge @ 2022-06-08 12:26 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:595eb9c4118f95a1f3723187b095e97210fc13ea

commit 595eb9c4118f95a1f3723187b095e97210fc13ea
Author: Philip Herron <philip.herron@embecosm.com>
Date:   Wed Mar 30 18:09:19 2022 +0100

    Add known lang item const_slice_ptr mappings
    
    This will allow us to define the const_slice_ptr lang item attribute
    without erroring out as an unknown lang item.

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

diff --git a/gcc/rust/util/rust-lang-item.h b/gcc/rust/util/rust-lang-item.h
index d2765bf201e..5f5d4354e8c 100644
--- a/gcc/rust/util/rust-lang-item.h
+++ b/gcc/rust/util/rust-lang-item.h
@@ -70,6 +70,7 @@ public:
 
     // https://github.com/rust-lang/rust/blob/master/library/core/src/ptr/const_ptr.rs
     CONST_PTR,
+    CONST_SLICE_PTR,
 
     UNKNOWN,
   };
@@ -208,6 +209,10 @@ public:
       {
 	return ItemType::CONST_PTR;
       }
+    else if (item.compare ("const_slice_ptr") == 0)
+      {
+	return ItemType::CONST_SLICE_PTR;
+      }
 
     return ItemType::UNKNOWN;
   }
@@ -282,6 +287,8 @@ public:
 	return "RangeToInclusive";
       case CONST_PTR:
 	return "const_ptr";
+      case CONST_SLICE_PTR:
+	return "const_slice_ptr";
 
       case UNKNOWN:
 	return "<UNKNOWN>";


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

only message in thread, other threads:[~2022-06-08 12:26 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-08 12:26 [gcc/devel/rust/master] Add known lang item const_slice_ptr mappings Thomas Schwinge

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).