]> git.ipfire.org Git - thirdparty/gcc.git/commit
Add more checks for expr value in early visitors
authorPierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
Tue, 24 Oct 2023 14:01:52 +0000 (16:01 +0200)
committerCohenArthur <arthur.cohen@embecosm.com>
Mon, 6 Nov 2023 17:13:22 +0000 (17:13 +0000)
commit2c5d1113e3352992a3e497dc092e14741aaca334
tree0775291121a47b860b117f515a7574c4fbe30cd5
parent1f8a1bbff69b3a3e9feea8084291baad0d4a28eb
Add more checks for expr value in early visitors

Early passes visitors may encounter constant item without a value, this
is expected as the pass rejecting a constant without an expression is
done later during the ast validation.

gcc/rust/ChangeLog:

* expand/rust-cfg-strip.cc (CfgStrip::visit): Add expr value check.
* expand/rust-expand-visitor.cc (ExpandVisitor::visit): Likewise.
* resolve/rust-early-name-resolver.cc (EarlyNameResolver::visit):
Likewise.

Signed-off-by: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
gcc/rust/expand/rust-cfg-strip.cc
gcc/rust/expand/rust-expand-visitor.cc
gcc/rust/resolve/rust-early-name-resolver.cc