aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorOwen Avery <powerboat9.gamer@gmail.com>2023-08-02 15:52:54 -0400
committerPhilip Herron <philip.herron@embecosm.com>2023-08-09 09:23:16 +0000
commit09e23335a289de79b8e202b0afdf32caee53dcdb (patch)
treeb09df6cb97a6fcb55c1742021302df10cea6a888 /gcc
parenta4b7e7375facb701585b2989ef3490528ec5bc9f (diff)
downloadgcc-09e23335a289de79b8e202b0afdf32caee53dcdb.zip
gcc-09e23335a289de79b8e202b0afdf32caee53dcdb.tar.gz
gcc-09e23335a289de79b8e202b0afdf32caee53dcdb.tar.bz2
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.cc6
-rw-r--r--gcc/rust/rust-backend.h10
-rw-r--r--gcc/rust/rust-gcc.cc2
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 d78a2d7..4e7b624 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 b0d2562..1b35199 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 2cca37b..42fbe8e 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.