diff options
author | Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com> | 2023-10-24 16:46:21 +0200 |
---|---|---|
committer | CohenArthur <arthur.cohen@embecosm.com> | 2023-11-06 17:13:22 +0000 |
commit | 230cd6df82b6705a82799c33533ae61c3cab86d0 (patch) | |
tree | 56b28d145263780e15dfc20de342cacd7d52d4df /gcc | |
parent | d8286cfb1ff34e70f0bb2209b62c5dce7cf4d6a3 (diff) | |
download | gcc-230cd6df82b6705a82799c33533ae61c3cab86d0.zip gcc-230cd6df82b6705a82799c33533ae61c3cab86d0.tar.gz gcc-230cd6df82b6705a82799c33533ae61c3cab86d0.tar.bz2 |
Add call to ast validation checker
Add call to ast validation check, also add appropriate step to this pass
and the feature gating.
gcc/rust/ChangeLog:
* rust-session-manager.cc (Session::compile_crate): Add call to ast
validation.
Signed-off-by: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/rust/rust-session-manager.cc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/rust/rust-session-manager.cc b/gcc/rust/rust-session-manager.cc index c18a3d0..33aa133 100644 --- a/gcc/rust/rust-session-manager.cc +++ b/gcc/rust/rust-session-manager.cc @@ -47,6 +47,7 @@ #include "rust-unicode.h" #include "rust-attribute-values.h" #include "rust-borrow-checker.h" +#include "rust-ast-validation.h" #include "input.h" #include "selftest.h" @@ -600,7 +601,15 @@ Session::compile_crate (const char *filename) rust_debug ("END POST-EXPANSION AST DUMP"); } + // AST Validation pass + if (last_step == CompileOptions::CompileStep::ASTValidation) + return; + + ASTValidation ().check (parsed_crate); + // feature gating + if (last_step == CompileOptions::CompileStep::FeatureGating) + return; FeatureGate ().check (parsed_crate); if (last_step == CompileOptions::CompileStep::NameResolution) |