rustc: Remove metadata from the session.

This mechanism was not being used for anything. Issue #487.
This commit is contained in:
Brian Anderson 2011-06-17 14:40:05 -07:00
parent 374967f67e
commit 81a187e8be
3 changed files with 2 additions and 8 deletions

View File

@ -270,9 +270,8 @@ fn build_session(@session::options sopts) -> session::session {
auto target_cfg = build_target_config(); auto target_cfg = build_target_config();
auto crate_cache = common::new_int_hash[session::crate_metadata](); auto crate_cache = common::new_int_hash[session::crate_metadata]();
auto target_crate_num = 0; auto target_crate_num = 0;
let vec[@ast::meta_item] md = [];
auto sess = auto sess =
session::session(target_crate_num, target_cfg, sopts, crate_cache, md, session::session(target_crate_num, target_cfg, sopts, crate_cache,
front::codemap::new_codemap()); front::codemap::new_codemap());
ret sess; ret sess;
} }

View File

@ -66,7 +66,6 @@ obj session(ast::crate_num cnum,
@config targ_cfg, @config targ_cfg,
@options opts, @options opts,
map::hashmap[int, crate_metadata] crates, map::hashmap[int, crate_metadata] crates,
mutable vec[@ast::meta_item] metadata,
codemap::codemap cm) { codemap::codemap cm) {
fn get_targ_cfg() -> @config { ret targ_cfg; } fn get_targ_cfg() -> @config { ret targ_cfg; }
fn get_opts() -> @options { ret opts; } fn get_opts() -> @options { ret opts; }
@ -81,8 +80,6 @@ obj session(ast::crate_num cnum,
emit_diagnostic(none[span], msg, "error", 9u8, cm); emit_diagnostic(none[span], msg, "error", 9u8, cm);
fail; fail;
} }
fn add_metadata(vec[@ast::meta_item] data) { metadata = metadata + data; }
fn get_metadata() -> vec[@ast::meta_item] { ret metadata; }
fn span_warn(span sp, str msg) { fn span_warn(span sp, str msg) {
// FIXME: Use constants, but rustboot doesn't know how to export them. // FIXME: Use constants, but rustboot doesn't know how to export them.

View File

@ -316,9 +316,7 @@ fn eval_crate_directive(ctx cx, env e, @ast::crate_directive cdir, str prefix,
case (ast::cdir_view_item(?vi)) { case (ast::cdir_view_item(?vi)) {
vec::push[@ast::view_item](view_items, vi); vec::push[@ast::view_item](view_items, vi);
} }
case (ast::cdir_meta(?vi, ?mi)) { case (ast::cdir_meta(?vi, ?mi)) { }
if (vi == ast::export_meta) { cx.sess.add_metadata(mi); }
}
case (ast::cdir_syntax(?pth)) { } case (ast::cdir_syntax(?pth)) { }
case (ast::cdir_auth(?pth, ?eff)) { } case (ast::cdir_auth(?pth, ?eff)) { }
} }