public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r14-7889] gccrs: session-manager: Run name resolution 2.0 if the option is present
@ 2024-01-16 18:04 Arthur Cohen
0 siblings, 0 replies; only message in thread
From: Arthur Cohen @ 2024-01-16 18:04 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:301e59b864ba32b6e69b906a11352863983c2572
commit r14-7889-g301e59b864ba32b6e69b906a11352863983c2572
Author: Arthur Cohen <arthur.cohen@embecosm.com>
Date: Fri Jun 23 16:35:47 2023 +0200
gccrs: session-manager: Run name resolution 2.0 if the option is present
gcc/rust/ChangeLog:
* rust-session-manager.cc
(Session::expansion): Use new `Early` name resolution 2.0 pass
Diff:
---
gcc/rust/rust-session-manager.cc | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/gcc/rust/rust-session-manager.cc b/gcc/rust/rust-session-manager.cc
index 3461198be95..401133c14dc 100644
--- a/gcc/rust/rust-session-manager.cc
+++ b/gcc/rust/rust-session-manager.cc
@@ -40,6 +40,8 @@
#include "rust-extern-crate.h"
#include "rust-attributes.h"
#include "rust-early-name-resolver.h"
+#include "rust-name-resolution-context.h"
+#include "rust-early-name-resolver-2.0.h"
#include "rust-cfg-strip.h"
#include "rust-expand-visitor.h"
#include "rust-unicode.h"
@@ -605,6 +607,7 @@ Session::compile_crate (const char *filename)
// resolution pipeline stage
Resolver::NameResolution::Resolve (parsed_crate);
+
if (options.dump_option_enabled (CompileOptions::RESOLUTION_DUMP))
{
// TODO: what do I dump here? resolved names? AST with resolved names?
@@ -876,7 +879,14 @@ Session::expansion (AST::Crate &crate)
while (!fixed_point_reached && iterations < cfg.recursion_limit)
{
CfgStrip ().go (crate);
- Resolver::EarlyNameResolver ().go (crate);
+
+ auto ctx = Resolver2_0::NameResolutionContext ();
+
+ if (flag_name_resolution_2_0)
+ Resolver2_0::Early (ctx).go (crate);
+ else
+ Resolver::EarlyNameResolver ().go (crate);
+
ExpandVisitor (expander).go (crate);
fixed_point_reached = !expander.has_changed ();
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-01-16 18:04 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-16 18:04 [gcc r14-7889] gccrs: session-manager: Run name resolution 2.0 if the option is present Arthur Cohen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).