aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc')
-rw-r--r--gcc/rust/rust-session-manager.cc17
1 files changed, 8 insertions, 9 deletions
diff --git a/gcc/rust/rust-session-manager.cc b/gcc/rust/rust-session-manager.cc
index 3e573a6..da50948 100644
--- a/gcc/rust/rust-session-manager.cc
+++ b/gcc/rust/rust-session-manager.cc
@@ -344,8 +344,8 @@ Session::enable_dump (std::string arg)
if (arg == "all")
{
rust_error_at (Location (),
- "dumping all is not supported as of now. choose %<lex%>, "
- "%<parse%>, or %<target_options%>");
+ "dumping all is not supported as of now. choose %<lex%>, %<parse%>, "
+ "or %<target_options%>");
return false;
}
else if (arg == "lex")
@@ -390,8 +390,8 @@ Session::enable_dump (std::string arg)
else
{
rust_error_at (Location (),
- "dump option %qs was unrecognised. choose %<lex%>, "
- "%<parse%>, or %<target_options%>",
+ "dump option %qs was unrecognised. choose %<lex%>, %<parse%>, or "
+ "%<target_options%>",
arg.c_str ());
return false;
}
@@ -472,7 +472,6 @@ Session::parse_file (const char *filename)
if (options.dump_option == CompileOptions::REGISTER_PLUGINS_DUMP)
{
// TODO: what do I dump here?
- return;
}
// injection pipeline stage
@@ -482,7 +481,6 @@ Session::parse_file (const char *filename)
if (options.dump_option == CompileOptions::INJECTION_DUMP)
{
// TODO: what do I dump here? injected crate names?
- return;
}
// expansion pipeline stage
@@ -491,8 +489,10 @@ Session::parse_file (const char *filename)
if (options.dump_option == CompileOptions::EXPANSION_DUMP)
{
- // TODO: what do I dump here? expanded macros? AST with expanded macros?
- return;
+ // dump AST with expanded stuff
+ fprintf (stderr, "BEGIN POST-EXPANSION AST DUMP\n");
+ parser.debug_dump_ast_output (parsed_crate);
+ fprintf (stderr, "END POST-EXPANSION AST DUMP\n");
}
// resolution pipeline stage
@@ -502,7 +502,6 @@ Session::parse_file (const char *filename)
if (options.dump_option == CompileOptions::RESOLUTION_DUMP)
{
// TODO: what do I dump here? resolved names? AST with resolved names?
- return;
}
if (saw_errors ())