aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/hir/rust-hir-dump.cc
diff options
context:
space:
mode:
authorThomas Schwinge <thomas@codesourcery.com>2023-04-12 11:47:01 +0200
committerThomas Schwinge <thomas@codesourcery.com>2023-04-14 11:57:27 +0200
commit705de6d54ca95b8277a15fe9a2255af6168ae086 (patch)
tree5331f0205178f7855df5870d7d6ed2520175aa9a /gcc/rust/hir/rust-hir-dump.cc
parent4e95a9117487c07f876f913499cb9954b6cd7d54 (diff)
downloadgcc-705de6d54ca95b8277a15fe9a2255af6168ae086.zip
gcc-705de6d54ca95b8277a15fe9a2255af6168ae086.tar.gz
gcc-705de6d54ca95b8277a15fe9a2255af6168ae086.tar.bz2
Rust: Make 'tree'-level 'MAIN_NAME_P' work
'gcc/tree.h': #define main_identifier_node global_trees[TI_MAIN_IDENTIFIER] #define MAIN_NAME_P(NODE) \ (IDENTIFIER_NODE_CHECK (NODE) == main_identifier_node) ..., which is not initialized by default, but has to be set up by every front end individually. 'MAIN_NAME_P' enables certain code optimizations, but is especially also relevant for back ends that emit additional program entry setup code for 'main'. gcc/rust/ * backend/rust-compile-base.cc (HIRCompileBase::compile_function): For 'main', initialize 'main_identifier_node'.
Diffstat (limited to 'gcc/rust/hir/rust-hir-dump.cc')
0 files changed, 0 insertions, 0 deletions