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-backend.h | |
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-backend.h')
-rw-r--r-- | gcc/rust/rust-backend.h | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/gcc/rust/rust-backend.h b/gcc/rust/rust-backend.h index c9260de..e8307e9 100644 --- a/gcc/rust/rust-backend.h +++ b/gcc/rust/rust-backend.h @@ -416,20 +416,20 @@ public: // Create a new label. NAME will be empty if this is a label // created by the frontend for a loop construct. The location is // where the label is defined. - virtual tree label (tree, const std::string &name, location_t) = 0; + tree label (tree, const std::string &name, location_t); // Create a statement which defines a label. This statement will be // put into the codestream at the point where the label should be // defined. - virtual tree label_definition_statement (tree) = 0; + tree label_definition_statement (tree); // Create a goto statement to a label. - virtual tree goto_statement (tree, location_t) = 0; + tree goto_statement (tree, location_t); // Create an expression for the address of a label. This is used to // get the return address of a deferred function which may call // recover. - virtual tree label_address (tree, location_t) = 0; + tree label_address (tree, location_t); // Functions. @@ -620,16 +620,6 @@ public: Bvariable *temporary_variable (tree, tree, tree, tree, bool, location_t, tree *); - // Labels. - - tree label (tree, const std::string &name, location_t); - - tree label_definition_statement (tree); - - tree goto_statement (tree, location_t); - - tree label_address (tree, location_t); - // Functions. tree function (tree fntype, const std::string &name, |