]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Revert "Rust: Make 'tree'-level 'MAIN_NAME_P' work"
authorThomas Schwinge <thomas@codesourcery.com>
Fri, 14 Apr 2023 09:57:21 +0000 (11:57 +0200)
committerThomas Schwinge <thomas@codesourcery.com>
Fri, 14 Apr 2023 09:57:21 +0000 (11:57 +0200)
This reverts commit 41c7e1d0a707f97327f097022e9e6fa7f6f13533.

gcc/rust/backend/rust-compile-base.cc
gcc/rust/rust-lang.cc

index 9b8a793a3c733d00b98332da61349159d92131b4..9650d1a47ee6fedac30c46b1af93455bf12878ce 100644 (file)
@@ -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;
index 9f1a914ed73ff9206bb739b84350bd8ba51fdecb..f3532298aecc815fd242bcf8330beb25c6fa7946 100644 (file)
@@ -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 ();