[committed,043/103] gccrs: Add missing fn_once_output langitem

Message ID 20230221120230.596966-44-arthur.cohen@embecosm.com
State Unresolved
Headers
Series [committed,001/103] gccrs: Fix missing dead code analysis ICE on local enum definition |

Checks

Context Check Description
snail/gcc-patch-check warning Git am fail log

Commit Message

Arthur Cohen Feb. 21, 2023, 12:01 p.m. UTC
  From: Philip Herron <philip.herron@embecosm.com>

gcc/rust/ChangeLog:

	* util/rust-lang-item.h: Add handling for `fn_once_output`.
---
 gcc/rust/util/rust-lang-item.h | 7 +++++++
 1 file changed, 7 insertions(+)
  

Patch

diff --git a/gcc/rust/util/rust-lang-item.h b/gcc/rust/util/rust-lang-item.h
index c7e0e5c811d..02eeaee60df 100644
--- a/gcc/rust/util/rust-lang-item.h
+++ b/gcc/rust/util/rust-lang-item.h
@@ -75,6 +75,7 @@  public:
 
     // functions
     FN_ONCE,
+    FN_ONCE_OUTPUT,
 
     UNKNOWN,
   };
@@ -225,6 +226,10 @@  public:
       {
 	return ItemType::FN_ONCE;
       }
+    else if (item.compare ("fn_once_output") == 0)
+      {
+	return ItemType::FN_ONCE_OUTPUT;
+      }
 
     return ItemType::UNKNOWN;
   }
@@ -305,6 +310,8 @@  public:
 	return "const_slice_ptr";
       case FN_ONCE:
 	return "fn_once";
+      case FN_ONCE_OUTPUT:
+	return "fn_once_output";
 
       case UNKNOWN:
 	return "<UNKNOWN>";