aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/rust-gcc.cc
diff options
context:
space:
mode:
authorPhilip Herron <philip.herron@embecosm.com>2021-01-13 21:14:28 +0000
committerPhilip Herron <herron.philip@googlemail.com>2021-01-16 14:07:50 +0000
commitd96e1594dd378078987900819afc611bd0db19b0 (patch)
tree7105c8abfaaabe2dbd997aee37e13fe0bed860c4 /gcc/rust/rust-gcc.cc
parent05b9f235566d7d361709c5bc44e7c36598515946 (diff)
downloadgcc-d96e1594dd378078987900819afc611bd0db19b0.zip
gcc-d96e1594dd378078987900819afc611bd0db19b0.tar.gz
gcc-d96e1594dd378078987900819afc611bd0db19b0.tar.bz2
This brings in resolution and type checking of the unit-type.
It is possible to assign and declare variables of unit-type which translate down to zero sized void_type_node. More work is needed to handle array and ADT types using unit-type when emiting gimple. The name+type resolution should be generic enough.
Diffstat (limited to 'gcc/rust/rust-gcc.cc')
-rw-r--r--gcc/rust/rust-gcc.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/rust/rust-gcc.cc b/gcc/rust/rust-gcc.cc
index bfa7609..748aa5a 100644
--- a/gcc/rust/rust-gcc.cc
+++ b/gcc/rust/rust-gcc.cc
@@ -225,6 +225,8 @@ public:
return this->make_expression (null_pointer_node);
}
+ Bexpression *unit_expression () { return this->make_expression (void_node); }
+
Bexpression *var_expression (Bvariable *var, Location);
Bexpression *indirect_expression (Btype *, Bexpression *expr,