diff options
Diffstat (limited to 'gcc/rust/rust-session-manager.h')
-rw-r--r-- | gcc/rust/rust-session-manager.h | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/gcc/rust/rust-session-manager.h b/gcc/rust/rust-session-manager.h index b5a715c..83ba121 100644 --- a/gcc/rust/rust-session-manager.h +++ b/gcc/rust/rust-session-manager.h @@ -264,6 +264,13 @@ struct CompileOptions } compile_until = CompileStep::End; + enum class PanicStrategy + { + Unwind, + Abort, + } panic_strategy + = PanicStrategy::Unwind; + bool dump_option_enabled (DumpOption option) const { return dump_options.find (option) != dump_options.end (); @@ -320,6 +327,13 @@ struct CompileOptions const CompileStep &get_compile_until () const { return compile_until; } + void set_panic_strategy (int strategy) + { + panic_strategy = static_cast<PanicStrategy> (strategy); + } + + const PanicStrategy &get_panic_strategy () const { return panic_strategy; } + void set_metadata_output (const std::string &path) { metadata_output_path = path; @@ -376,7 +390,7 @@ public: const struct cl_option_handlers *handlers); void handle_input_files (int num_files, const char **files); void init_options (); - void handle_crate_name (const AST::Crate &parsed_crate); + void handle_crate_name (const char *filename, const AST::Crate &parsed_crate); /* This function saves the filename data into the session manager using the * `move` semantics, and returns a C-style string referencing the input |