gcc/rust/ChangeLog:
* rust-session-manager.cc (Session::compile_crate): Move the AST dump
after parser error check.
Signed-off-by: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
handle_crate_name (filename, *ast_crate.get ());
// dump options except lexer dump
- if (options.dump_option_enabled (CompileOptions::AST_DUMP_PRETTY))
- {
- dump_ast_pretty (*ast_crate.get ());
- }
if (options.dump_option_enabled (CompileOptions::TARGET_OPTION_DUMP))
{
options.target_data.dump_target_options ();
if (saw_errors ())
return;
+ if (options.dump_option_enabled (CompileOptions::AST_DUMP_PRETTY))
+ {
+ dump_ast_pretty (*ast_crate.get ());
+ }
+
// setup the mappings for this AST
CrateNum current_crate = mappings.get_current_crate ();
AST::Crate &parsed_crate