diff options
Diffstat (limited to 'gcc/rust/backend/rust-compile-tyty.h')
-rw-r--r-- | gcc/rust/backend/rust-compile-tyty.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/gcc/rust/backend/rust-compile-tyty.h b/gcc/rust/backend/rust-compile-tyty.h index b6794bc..2c54b17 100644 --- a/gcc/rust/backend/rust-compile-tyty.h +++ b/gcc/rust/backend/rust-compile-tyty.h @@ -190,6 +190,20 @@ public: gcc_unreachable (); } + void visit (TyTy::USizeType &type) override + { + translated = backend->named_type ( + "usize", backend->integer_type (true, backend->get_pointer_size ()), + Linemap::predeclared_location ()); + } + + void visit (TyTy::ISizeType &type) override + { + translated = backend->named_type ( + "isize", backend->integer_type (false, backend->get_pointer_size ()), + Linemap::predeclared_location ()); + } + private: TyTyCompile (::Backend *backend) : backend (backend), translated (nullptr), |