diff options
author | @mvvsmk <mvvsmanojkumar@gmail.com> | 2022-01-23 19:53:39 +0530 |
---|---|---|
committer | @mvvsmk <mvvsmanojkumar@gmail.com> | 2022-01-26 12:55:42 +0530 |
commit | 6508698504a2bb2e6b92b74f11d55ca4282927f4 (patch) | |
tree | 23cb9985e42bf5b2e97005353aa15e14af7765f7 /gcc/rust/backend/rust-compile-expr.cc | |
parent | 2cce6b8919ce16acd37a7a203049a52925a7e295 (diff) | |
download | gcc-6508698504a2bb2e6b92b74f11d55ca4282927f4.zip gcc-6508698504a2bb2e6b92b74f11d55ca4282927f4.tar.gz gcc-6508698504a2bb2e6b92b74f11d55ca4282927f4.tar.bz2 |
Added location data to Match Arm and removed unused code
Addresses #863
Added location data to Match arm in gcc/rust/ast/rust-expr.h and gcc/rust/hir/tree/rust-hir-expr.h
Updated the respective constructors and copy constructors
Updated location info for match arm in code generation in gcc/rust/backend/eust-compile-expr.cc
Removed unused code in the above rust-expr.h and rust-gir-expr.h files as mentioned in the issue.
Signed-off-by:M V V S Manoj Kumar <mvvsmanojkumar@gmail.com>
Diffstat (limited to 'gcc/rust/backend/rust-compile-expr.cc')
-rw-r--r-- | gcc/rust/backend/rust-compile-expr.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/rust/backend/rust-compile-expr.cc b/gcc/rust/backend/rust-compile-expr.cc index c58d29d..3e5db29 100644 --- a/gcc/rust/backend/rust-compile-expr.cc +++ b/gcc/rust/backend/rust-compile-expr.cc @@ -274,7 +274,7 @@ CompileExpr::visit (HIR::MatchExpr &expr) rust_assert (kase_arm.get_patterns ().size () > 0); // generate implicit label - Location arm_locus = kase_arm.get_patterns ().at (0)->get_locus (); + Location arm_locus = kase_arm.get_locus (); tree case_label = ctx->get_backend ()->label ( fndecl, "" /* empty creates an artificial label */, arm_locus); |