aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/rust-session-manager.h
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/rust/rust-session-manager.h')
-rw-r--r--gcc/rust/rust-session-manager.h25
1 files changed, 24 insertions, 1 deletions
diff --git a/gcc/rust/rust-session-manager.h b/gcc/rust/rust-session-manager.h
index b3724c5..6ecd513 100644
--- a/gcc/rust/rust-session-manager.h
+++ b/gcc/rust/rust-session-manager.h
@@ -199,6 +199,22 @@ struct CompileOptions
} edition
= Edition::E2015;
+ enum class CompileStep
+ {
+ Ast,
+ AttributeCheck,
+ Expansion,
+ NameResolution,
+ Lowering,
+ TypeCheck,
+ Privacy,
+ Unsafety,
+ Const,
+ Compilation,
+ End,
+ } compile_until
+ = CompileStep::End;
+
bool dump_option_enabled (DumpOption option) const
{
return dump_options.find (option) != dump_options.end ();
@@ -239,7 +255,14 @@ struct CompileOptions
edition = static_cast<Edition> (raw_edition);
}
- const Edition &get_edition () { return edition; }
+ const Edition &get_edition () const { return edition; }
+
+ void set_compile_step (int raw_step)
+ {
+ compile_until = static_cast<CompileStep> (raw_step);
+ }
+
+ const CompileStep &get_compile_until () const { return compile_until; }
void set_metadata_output (const std::string &path)
{