https://gcc.gnu.org/g:4e95a9117487c07f876f913499cb9954b6cd7d54

commit 4e95a9117487c07f876f913499cb9954b6cd7d54
Author: Thomas Schwinge <tho...@codesourcery.com>
Date:   Fri Apr 14 11:57:21 2023 +0200

    Revert "Rust: Make 'tree'-level 'MAIN_NAME_P' work"
    
    This reverts commit 41c7e1d0a707f97327f097022e9e6fa7f6f13533.

Diff:
---
 gcc/rust/backend/rust-compile-base.cc | 3 ---
 gcc/rust/rust-lang.cc                 | 3 ---
 2 files changed, 6 deletions(-)

diff --git a/gcc/rust/backend/rust-compile-base.cc 
b/gcc/rust/backend/rust-compile-base.cc
index 9b8a793a3c73..9650d1a47ee6 100644
--- a/gcc/rust/backend/rust-compile-base.cc
+++ b/gcc/rust/backend/rust-compile-base.cc
@@ -523,9 +523,6 @@ HIRCompileBase::compile_function (
 
   // we don't mangle the main fn since we haven't implemented the main shim
   bool is_main_fn = fn_name.compare ("main") == 0;
-  if (is_main_fn)
-    /* So that 'MAIN_NAME_P' works.  */
-    ir_symbol_name = fn_name;
   std::string asm_name = fn_name;
 
   unsigned int flags = 0;
diff --git a/gcc/rust/rust-lang.cc b/gcc/rust/rust-lang.cc
index 9f1a914ed73f..f3532298aecc 100644
--- a/gcc/rust/rust-lang.cc
+++ b/gcc/rust/rust-lang.cc
@@ -38,7 +38,6 @@
 #include "rust-privacy-ctx.h"
 #include "rust-ast-resolve-item.h"
 #include "rust-optional.h"
-#include "stringpool.h"
 
 #include <mpfr.h>
 // note: header files must be in this order or else forward declarations don't
@@ -125,8 +124,6 @@ grs_langhook_init (void)
    whether char is signed.  */
   build_common_tree_nodes (false);
 
-  main_identifier_node = get_identifier ("main");
-
   // Builds built-ins for middle-end after all front-end built-ins are already
   // instantiated
   build_common_builtin_nodes ();

Reply via email to