]> git.ipfire.org Git - thirdparty/gcc.git/commit
gccrs: 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)
committerArthur Cohen <arthur.cohen@embecosm.com>
Tue, 16 Jan 2024 18:13:10 +0000 (19:13 +0100)
commitd430d0bac3e447b323c3ff70bdfb83555e5cadd1
tree74707783b31d2b4313a840648a64adb31d2fd561
parent55bfecc95a577c58edd93061852e40b93b47d19c
gccrs: 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