From 1a97dbc6b54cd77ba7c3f00cb8dd2e870017a83c Mon Sep 17 00:00:00 2001 From: Philip Herron Date: Tue, 5 Jan 2021 17:49:01 +0000 Subject: Examine the Suffix hint on integers to apply apropriate TyTy type. This change propagates the PrimitiveCoreType to AST and HIR so the suffix can be examined. --- gcc/rust/backend/rust-compile-tyty.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'gcc/rust/backend') diff --git a/gcc/rust/backend/rust-compile-tyty.h b/gcc/rust/backend/rust-compile-tyty.h index 66d2472..f4e467a 100644 --- a/gcc/rust/backend/rust-compile-tyty.h +++ b/gcc/rust/backend/rust-compile-tyty.h @@ -111,6 +111,18 @@ public: = backend->named_type ("i32", backend->integer_type (false, 32), Linemap::predeclared_location ()); return; + + case TyTy::IntType::I64: + translated + = backend->named_type ("i64", backend->integer_type (false, 64), + Linemap::predeclared_location ()); + return; + + case TyTy::IntType::I128: + translated + = backend->named_type ("i128", backend->integer_type (false, 128), + Linemap::predeclared_location ()); + return; } gcc_unreachable (); } @@ -135,6 +147,18 @@ public: = backend->named_type ("i32", backend->integer_type (true, 32), Linemap::predeclared_location ()); return; + + case TyTy::UintType::U64: + translated + = backend->named_type ("u64", backend->integer_type (true, 64), + Linemap::predeclared_location ()); + return; + + case TyTy::UintType::U128: + translated + = backend->named_type ("u128", backend->integer_type (true, 128), + Linemap::predeclared_location ()); + return; } gcc_unreachable (); } -- cgit v1.1