diff options
author | Andrew Pinski <quic_apinski@quicinc.com> | 2025-03-19 17:30:02 -0700 |
---|---|---|
committer | CohenArthur <arthur.cohen@embecosm.com> | 2025-04-10 15:53:50 +0000 |
commit | 7ef77dad7cdd8d4b2b558a190b03a4e39557feab (patch) | |
tree | 2dc748a1c664a648268b79eb2da396eb002b01ff /gcc/rust/rust-gcc.cc | |
parent | f20261115987df04a9e62dd9e857561fb1530c8e (diff) | |
download | gcc-7ef77dad7cdd8d4b2b558a190b03a4e39557feab.zip gcc-7ef77dad7cdd8d4b2b558a190b03a4e39557feab.tar.gz gcc-7ef77dad7cdd8d4b2b558a190b03a4e39557feab.tar.bz2 |
rust: Add comment inside block [PR119342]
Inside a BLOCK node, all of the variables of the scope/block
are chained together and that connects them to the block.
This just adds a comment to that effect as reading the code
it is not so obvious why they need to be chained together.
gcc/rust/ChangeLog:
PR rust/119342
* rust-gcc.cc (block): Add comment on why chaining
the variables of the scope toether.
Signed-off-by: Andrew Pinski <quic_apinski@quicinc.com>
Diffstat (limited to 'gcc/rust/rust-gcc.cc')
-rw-r--r-- | gcc/rust/rust-gcc.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/rust/rust-gcc.cc b/gcc/rust/rust-gcc.cc index 85743c4..524cee7 100644 --- a/gcc/rust/rust-gcc.cc +++ b/gcc/rust/rust-gcc.cc @@ -1792,6 +1792,8 @@ block (tree fndecl, tree enclosing, const std::vector<Bvariable *> &vars, *pp = block_tree; } + // Chain the variables of the scope together so they are all connected + // to the block. tree *pp = &BLOCK_VARS (block_tree); for (Bvariable *bv : vars) { |