diff options
author | Owen Avery <powerboat9.gamer@gmail.com> | 2023-08-02 15:52:54 -0400 |
---|---|---|
committer | Arthur Cohen <arthur.cohen@embecosm.com> | 2024-01-16 19:00:28 +0100 |
commit | 79b52e69569552551abbcb8ee1436c819bce3979 (patch) | |
tree | d53272394d8929cadf898b77da12cd97333b80e9 /gcc | |
parent | fadf5f59940ddb895b4907730570dc0bae6ec98a (diff) | |
download | gcc-79b52e69569552551abbcb8ee1436c819bce3979.zip gcc-79b52e69569552551abbcb8ee1436c819bce3979.tar.gz gcc-79b52e69569552551abbcb8ee1436c819bce3979.tar.bz2 |
gccrs: Remove Backend::bool_type and Backend::char_type
gcc/rust/ChangeLog:
* backend/rust-compile-type.cc
(TyTyResolveCompile::visit): Inline Backend::bool_type call.
* rust-backend.h
(Backend::bool_type): Remove.
(Backend::char_type): Remove.
(Gcc_backend::bool_type): Remove.
(Gcc_backend::char_type): Remove.
* rust-gcc.cc
(Gcc_backend::char_constant_expression): Inline Backend::char_type call.
Signed-off-by: Owen Avery <powerboat9.gamer@gmail.com>
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/rust/backend/rust-compile-type.cc | 6 | ||||
-rw-r--r-- | gcc/rust/rust-backend.h | 10 | ||||
-rw-r--r-- | gcc/rust/rust-gcc.cc | 2 |
3 files changed, 3 insertions, 15 deletions
diff --git a/gcc/rust/backend/rust-compile-type.cc b/gcc/rust/backend/rust-compile-type.cc index 11f2a2f..6482d66 100644 --- a/gcc/rust/backend/rust-compile-type.cc +++ b/gcc/rust/backend/rust-compile-type.cc @@ -440,10 +440,8 @@ TyTyResolveCompile::visit (const TyTy::SliceType &type) void TyTyResolveCompile::visit (const TyTy::BoolType &) { - translated - = ctx->get_backend ()->named_type ("bool", - ctx->get_backend ()->bool_type (), - BUILTINS_LOCATION); + translated = ctx->get_backend ()->named_type ("bool", boolean_type_node, + BUILTINS_LOCATION); } void diff --git a/gcc/rust/rust-backend.h b/gcc/rust/rust-backend.h index 66d17b3..3674591 100644 --- a/gcc/rust/rust-backend.h +++ b/gcc/rust/rust-backend.h @@ -70,12 +70,6 @@ public: // Types. - // Get the unnamed boolean type. - virtual tree bool_type () = 0; - - // Get the char type - virtual tree char_type () = 0; - // Get the wchar type virtual tree wchar_type () = 0; @@ -521,10 +515,6 @@ public: // Types. - tree bool_type () { return boolean_type_node; } - - tree char_type () { return char_type_node; } - tree wchar_type (); int get_pointer_size (); diff --git a/gcc/rust/rust-gcc.cc b/gcc/rust/rust-gcc.cc index ced1e54..673ddaa 100644 --- a/gcc/rust/rust-gcc.cc +++ b/gcc/rust/rust-gcc.cc @@ -873,7 +873,7 @@ Gcc_backend::wchar_constant_expression (wchar_t c) tree Gcc_backend::char_constant_expression (char c) { - return build_int_cst (this->char_type (), c); + return build_int_cst (char_type_node, c); } // Make a constant boolean expression. |