]> git.ipfire.org Git - thirdparty/gcc.git/commit
Use specialized param visit function for params
authorPierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
Sat, 19 Apr 2025 12:14:25 +0000 (14:14 +0200)
committerP-E-P <32375388+P-E-P@users.noreply.github.com>
Thu, 24 Apr 2025 16:53:44 +0000 (16:53 +0000)
commitee61e8917f0057e271177c5ad2e5a4a7c3ccdbaa
treeab1f4745f70f56aaad3fc293870f74a4676ac8fb
parent38b913483fed6fe36fd5b692948ec9cf7ac2415c
Use specialized param visit function for params

This commit introduce a new public function to visit function parameters
in the default visitor. It allows visitors derived from DefaultVisitor
to override only a small part of the default visitor.

gcc/rust/ChangeLog:

* ast/rust-ast-visitor.cc (DefaultASTVisitor::visit_function_params):
Add specialized function to visit function parameters.
(DefaultASTVisitor::visit): Remove parameter visit and call specialized
function instead.
* ast/rust-ast-visitor.h: Add function prototye.
* resolve/rust-late-name-resolver-2.0.cc (Late::visit): Remove
function.
(Late::visit_function_params): Override specialized visit function.
* resolve/rust-late-name-resolver-2.0.h: Add overriden function
prototype.

Signed-off-by: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
gcc/rust/ast/rust-ast-visitor.cc
gcc/rust/ast/rust-ast-visitor.h
gcc/rust/resolve/rust-late-name-resolver-2.0.cc
gcc/rust/resolve/rust-late-name-resolver-2.0.h