diff options
author | Owen Avery <powerboat9.gamer@gmail.com> | 2023-01-11 12:05:39 -0500 |
---|---|---|
committer | Arthur Cohen <arthur.cohen@embecosm.com> | 2023-04-06 10:47:17 +0200 |
commit | 881ed7fb273c8898310a1475aa2162bbd1030ee0 (patch) | |
tree | 9ea1af09c441331e1d994d39ca159a4c5a7ff2e9 /gcc/rust/backend/rust-compile-base.cc | |
parent | 86f8e47f9df3cb0adf9b6cd6e48d7c89e2556721 (diff) | |
download | gcc-881ed7fb273c8898310a1475aa2162bbd1030ee0.zip gcc-881ed7fb273c8898310a1475aa2162bbd1030ee0.tar.gz gcc-881ed7fb273c8898310a1475aa2162bbd1030ee0.tar.bz2 |
gccrs: Change how CompileVarDecl outputs Bvariable's
This allows patterns to declare multiple/no variables
gcc/rust/ChangeLog:
* backend/rust-compile-base.cc (HIRCompileBase::compile_locals_for_block):
Allow patterns to declare zero or multiple variables.
* backend/rust-compile-var-decl.h: Change function declaration.
Signed-off-by: Owen Avery <powerboat9.gamer@gmail.com>
Diffstat (limited to 'gcc/rust/backend/rust-compile-base.cc')
-rw-r--r-- | gcc/rust/backend/rust-compile-base.cc | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/gcc/rust/backend/rust-compile-base.cc b/gcc/rust/backend/rust-compile-base.cc index 568abf9..c108661 100644 --- a/gcc/rust/backend/rust-compile-base.cc +++ b/gcc/rust/backend/rust-compile-base.cc @@ -457,9 +457,7 @@ HIRCompileBase::compile_locals_for_block (Context *ctx, Resolver::Rib &rib, // compile the local tree type = TyTyResolveCompile::compile (ctx, tyty); - Bvariable *compiled - = CompileVarDecl::compile (fndecl, type, pattern, ctx); - locals.push_back (compiled); + CompileVarDecl::compile (fndecl, type, pattern, locals, ctx); } return locals; } |