diff options
| author | Brian Anderson <banderson@mozilla.com> | 2011-06-29 22:32:08 -0700 |
|---|---|---|
| committer | Brian Anderson <banderson@mozilla.com> | 2011-06-30 10:06:26 -0700 |
| commit | 4165d3640a7b56f0d057a3d55992eb8c9ac05432 (patch) | |
| tree | 6e4de59b1a53ea22b3ac967ce2e425414d98b7b4 /src/comp/driver | |
| parent | 3483c65b1f7b511e1428e7599aee3fe747e4301a (diff) | |
| download | rust-4165d3640a7b56f0d057a3d55992eb8c9ac05432.tar.gz rust-4165d3640a7b56f0d057a3d55992eb8c9ac05432.zip | |
Add a pass to fold out items that do not belong in the current configuration
The parser needs to parse unconfigured items into the AST so that they can make the round trip back through the pretty printer, but subsequent passes shouldn't care about items not being translated. Running a fold pass after parsing is the lowest-impact way to make this work. The performance seems fine. Issue #489
Diffstat (limited to 'src/comp/driver')
| -rw-r--r-- | src/comp/driver/rustc.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/comp/driver/rustc.rs b/src/comp/driver/rustc.rs index d83e04e061a..55dcc35a637 100644 --- a/src/comp/driver/rustc.rs +++ b/src/comp/driver/rustc.rs @@ -80,6 +80,8 @@ fn compile_input(session::session sess, eval::env env, str input, auto crate = time(time_passes, "parsing", bind parse_input(sess, p, input)); if (sess.get_opts().output_type == link::output_type_none) { ret; } + crate = time(time_passes, "configuration", + bind front::config::strip_unconfigured_items(crate)); auto ast_map = time(time_passes, "ast indexing", bind middle::ast_map::map_crate(*crate)); auto d = |
