diff options
author | Marc Poulhiès <dkm@kataplop.net> | 2021-03-08 21:13:02 +0100 |
---|---|---|
committer | Philip Herron <herron.philip@googlemail.com> | 2021-03-27 18:03:34 +0000 |
commit | fabb3894d5fe5c2ca87917fd08b2f0813553532d (patch) | |
tree | c31d037df544c9dbd3adaa1f904ce38620037d3b /gcc/rust/backend/rust-compile-expr.h | |
parent | f9f1f1d7211e555ae7a22b21723ced7610fa5657 (diff) | |
download | gcc-fabb3894d5fe5c2ca87917fd08b2f0813553532d.zip gcc-fabb3894d5fe5c2ca87917fd08b2f0813553532d.tar.gz gcc-fabb3894d5fe5c2ca87917fd08b2f0813553532d.tar.bz2 |
WIP for #252
Removed TyTy::UnitType and TyTy::TypeKind::UNIT.
Replaced by TyTy::TupleType with an empty list of fields.
Added default empty vector for fields in ctor for TyTy::TypeType.
Diffstat (limited to 'gcc/rust/backend/rust-compile-expr.h')
-rw-r--r-- | gcc/rust/backend/rust-compile-expr.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/gcc/rust/backend/rust-compile-expr.h b/gcc/rust/backend/rust-compile-expr.h index f4353cd..d0c752c 100644 --- a/gcc/rust/backend/rust-compile-expr.h +++ b/gcc/rust/backend/rust-compile-expr.h @@ -368,7 +368,7 @@ public: } Bvariable *tmp = NULL; - bool needs_temp = if_type->get_kind () != TyTy::TypeKind::UNIT; + bool needs_temp = !if_type->is_unit (); if (needs_temp) { fncontext fnctx = ctx->peek_fn (); @@ -405,7 +405,7 @@ public: } Bvariable *tmp = NULL; - bool needs_temp = if_type->get_kind () != TyTy::TypeKind::UNIT; + bool needs_temp = !if_type->is_unit (); if (needs_temp) { fncontext fnctx = ctx->peek_fn (); @@ -441,7 +441,7 @@ public: } Bvariable *tmp = NULL; - bool needs_temp = block_tyty->get_kind () != TyTy::TypeKind::UNIT; + bool needs_temp = !block_tyty->is_unit (); if (needs_temp) { fncontext fnctx = ctx->peek_fn (); @@ -541,7 +541,7 @@ public: fncontext fnctx = ctx->peek_fn (); Bvariable *tmp = NULL; - bool needs_temp = block_tyty->get_kind () != TyTy::TypeKind::UNIT; + bool needs_temp = !block_tyty->is_unit (); if (needs_temp) { Bblock *enclosing_scope = ctx->peek_enclosing_scope (); |