diff options
author | Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com> | 2025-03-13 13:41:38 +0100 |
---|---|---|
committer | P-E-P <32375388+P-E-P@users.noreply.github.com> | 2025-03-17 10:41:21 +0000 |
commit | 34db31fb056e760b282c58772777e8145c0f19f4 (patch) | |
tree | 19d43fbb67a86d27b1ff772ca8637cd7fe2d58a8 /gcc/rust/resolve/rust-late-name-resolver-2.0.cc | |
parent | 9d88bcce6da404acee0363d7d417b199aca011c5 (diff) | |
download | gcc-34db31fb056e760b282c58772777e8145c0f19f4.zip gcc-34db31fb056e760b282c58772777e8145c0f19f4.tar.gz gcc-34db31fb056e760b282c58772777e8145c0f19f4.tar.bz2 |
Move import mapping resolution to in tree visit
Import mapping was relying on resolve_path which in turn relies on
the cursor function. This means the mapping resolver should be called
from the correct scope instead of being called from the crate scope.
gcc/rust/ChangeLog:
* resolve/rust-early-name-resolver-2.0.cc (Early::Early): Move the
top level visitor from the function scope to attributes.
(Early::go): Remove top level visitor creation and adapt calling code.
Remove call to mapping resolution and import finalization.
(Early::finalize_simple_import): Move the finalization from it's
visitor.
(Early::finalize_glob_import): Likewise.
(Early::finalize_rebind_import): Likewise.
(Early::visit): Add mapping resolution and finalization in
UseDeclaration visitor function.
* resolve/rust-finalize-imports-2.0.cc (finalize_simple_import): Move
function.
(finalize_glob_import): Likewise.
(finalize_rebind_import): Likewise.
(FinalizeImports::visit): Remove call to finalizers.
* resolve/rust-early-name-resolver-2.0.h (class Early): Add top level
attribute.
* resolve/rust-finalize-imports-2.0.h: Add function prototypes.
* resolve/rust-toplevel-name-resolver-2.0.h: Change getter return type
to reference.
Signed-off-by: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
Diffstat (limited to 'gcc/rust/resolve/rust-late-name-resolver-2.0.cc')
0 files changed, 0 insertions, 0 deletions