aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/backend/rust-compile-struct-field-expr.h
diff options
context:
space:
mode:
authorPhilip Herron <philip.herron@embecosm.com>2021-01-18 16:47:16 +0000
committerPhilip Herron <herron.philip@googlemail.com>2021-01-20 09:59:22 +0000
commit6e2acd529fcfa43368f7ea8209cc5e6b88d2bd79 (patch)
treebe47967ba0e8db1ab76d7688ecb29de40d3ccbc5 /gcc/rust/backend/rust-compile-struct-field-expr.h
parentf8d41b7e8a3a65382dc5ce30dfb3f85abe298d19 (diff)
downloadgcc-6e2acd529fcfa43368f7ea8209cc5e6b88d2bd79.zip
gcc-6e2acd529fcfa43368f7ea8209cc5e6b88d2bd79.tar.gz
gcc-6e2acd529fcfa43368f7ea8209cc5e6b88d2bd79.tar.bz2
Support Struct field index initialisation
For TupleStructs the constructor can take field indexes to support change or ordering of the fields.
Diffstat (limited to 'gcc/rust/backend/rust-compile-struct-field-expr.h')
-rw-r--r--gcc/rust/backend/rust-compile-struct-field-expr.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/rust/backend/rust-compile-struct-field-expr.h b/gcc/rust/backend/rust-compile-struct-field-expr.h
index a394f7a..0e54281 100644
--- a/gcc/rust/backend/rust-compile-struct-field-expr.h
+++ b/gcc/rust/backend/rust-compile-struct-field-expr.h
@@ -38,6 +38,8 @@ public:
void visit (HIR::StructExprFieldIdentifierValue &field);
+ void visit (HIR::StructExprFieldIndexValue &field);
+
private:
CompileStructExprField (Context *ctx)
: HIRCompileBase (ctx), translated (nullptr)