diff options
author | Owen Avery <powerboat9.gamer@gmail.com> | 2023-08-31 11:32:11 -0400 |
---|---|---|
committer | Philip Herron <philip.herron@embecosm.com> | 2023-09-02 22:31:54 +0000 |
commit | abf727d29eb7d70e238fd837921f2e5fb4e3fec0 (patch) | |
tree | 8f73a43a2c131887f0b7db6524415f848095cfd8 /gcc/rust/rust-gcc.cc | |
parent | 20f83726d400a3b20cf1ab5a3602e43b7a975372 (diff) | |
download | gcc-abf727d29eb7d70e238fd837921f2e5fb4e3fec0.zip gcc-abf727d29eb7d70e238fd837921f2e5fb4e3fec0.tar.gz gcc-abf727d29eb7d70e238fd837921f2e5fb4e3fec0.tar.bz2 |
Move label-related functions into base class Backend
gcc/rust/ChangeLog:
* rust-backend.h
(Backend::label): Make non-virtual.
(Backend::label_definition_statement): Likewise.
(Backend::goto_statement): Likewise.
(Backend::label_address): Likewise.
(Gcc_backend::label): Remove.
(Gcc_backend::label_definition_statement): Remove.
(Gcc_backend::goto_statement): Remove.
(Gcc_backend::label_address): Remove.
* rust-gcc.cc
(Gcc_backend::label): Rename to ...
(Backend::label): ... here.
(Gcc_backend::label_definition_statement): Rename to ...
(Backend::label_definition_statement): ... here.
(Gcc_backend::goto_statement): Rename to ...
(Backend::goto_statement): ... here.
(Gcc_backend::label_address): Rename to ...
(Backend::label_address): ... here.
Signed-off-by: Owen Avery <powerboat9.gamer@gmail.com>
Diffstat (limited to 'gcc/rust/rust-gcc.cc')
-rw-r--r-- | gcc/rust/rust-gcc.cc | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/gcc/rust/rust-gcc.cc b/gcc/rust/rust-gcc.cc index 16f0c7d..ec4f87b 100644 --- a/gcc/rust/rust-gcc.cc +++ b/gcc/rust/rust-gcc.cc @@ -2243,8 +2243,7 @@ Gcc_backend::temporary_variable (tree fndecl, tree bind_tree, tree type_tree, // Make a label. tree -Gcc_backend::label (tree func_tree, const std::string &name, - location_t location) +Backend::label (tree func_tree, const std::string &name, location_t location) { tree decl; if (name.empty ()) @@ -2270,7 +2269,7 @@ Gcc_backend::label (tree func_tree, const std::string &name, // Make a statement which defines a label. tree -Gcc_backend::label_definition_statement (tree label) +Backend::label_definition_statement (tree label) { return fold_build1_loc (DECL_SOURCE_LOCATION (label), LABEL_EXPR, void_type_node, label); @@ -2279,7 +2278,7 @@ Gcc_backend::label_definition_statement (tree label) // Make a goto statement. tree -Gcc_backend::goto_statement (tree label, location_t location) +Backend::goto_statement (tree label, location_t location) { return fold_build1_loc (location, GOTO_EXPR, void_type_node, label); } @@ -2287,7 +2286,7 @@ Gcc_backend::goto_statement (tree label, location_t location) // Get the address of a label. tree -Gcc_backend::label_address (tree label, location_t location) +Backend::label_address (tree label, location_t location) { TREE_USED (label) = 1; TREE_ADDRESSABLE (label) = 1; |