aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/backend/rust-compile-item.h
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2022-01-15 11:20:18 +0000
committerGitHub <noreply@github.com>2022-01-15 11:20:18 +0000
commitb02824c6a798a78657568e7d831bd10529d63e37 (patch)
tree83fd67a961ce521c6350e9c47bcbe3aa94965751 /gcc/rust/backend/rust-compile-item.h
parentb21caeb3af4313016afeb94a91956e8fc4c2656d (diff)
parent7d456b882a8f72b6fb3bdb0e71367811770b4413 (diff)
downloadgcc-b02824c6a798a78657568e7d831bd10529d63e37.zip
gcc-b02824c6a798a78657568e7d831bd10529d63e37.tar.gz
gcc-b02824c6a798a78657568e7d831bd10529d63e37.tar.bz2
Merge #874
874: Track end locus of BlockExpr r=philberty a=dafaust Capture the closing locus of a block during parsing, and remove the old hack to get the final statement locus within the block now that it is properly tracked. Fixes #864 Co-authored-by: David Faust <david.faust@oracle.com>
Diffstat (limited to 'gcc/rust/backend/rust-compile-item.h')
-rw-r--r--gcc/rust/backend/rust-compile-item.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/rust/backend/rust-compile-item.h b/gcc/rust/backend/rust-compile-item.h
index 208a2a5..c35efcc 100644
--- a/gcc/rust/backend/rust-compile-item.h
+++ b/gcc/rust/backend/rust-compile-item.h
@@ -142,7 +142,7 @@ public:
HIR::BlockExpr *function_body
= static_cast<HIR::BlockExpr *> (constant.get_expr ());
Location start_location = function_body->get_locus ();
- Location end_location = function_body->get_closing_locus ();
+ Location end_location = function_body->get_end_locus ();
tree code_block
= ctx->get_backend ()->block (fndecl, enclosing_scope, {},
@@ -341,7 +341,7 @@ public:
tree enclosing_scope = NULL_TREE;
HIR::BlockExpr *function_body = function.get_definition ().get ();
Location start_location = function_body->get_locus ();
- Location end_location = function_body->get_closing_locus ();
+ Location end_location = function_body->get_end_locus ();
tree code_block
= ctx->get_backend ()->block (fndecl, enclosing_scope, locals,