[gcc r14-8117] gccrs: Add call to ast validation checker
Arthur Cohen
cohenarthur@gcc.gnu.org
Tue Jan 16 18:15:04 GMT 2024
https://gcc.gnu.org/g:3fa7df6885920e2ed3d544ef482944e312ecaaf8
commit r14-8117-g3fa7df6885920e2ed3d544ef482944e312ecaaf8
Author: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
Date: Tue Oct 24 16:46:21 2023 +0200
gccrs: 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>
Diff:
---
gcc/rust/rust-session-manager.cc | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/gcc/rust/rust-session-manager.cc b/gcc/rust/rust-session-manager.cc
index b1ecb8ca32e..62c47b2e6de 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)
More information about the Gcc-cvs
mailing list