|
11 | 11 | use llvm;
|
12 | 12 | use llvm::{ContextRef, ModuleRef, ValueRef};
|
13 | 13 | use rustc::dep_graph::{DepGraph, DepGraphSafe, DepNode, DepTrackingMap, DepTrackingMapConfig};
|
14 |
| -use middle::cstore::LinkMeta; |
15 | 14 | use rustc::hir;
|
16 | 15 | use rustc::hir::def_id::{DefId, LOCAL_CRATE};
|
17 | 16 | use rustc::traits;
|
@@ -65,7 +64,6 @@ pub struct Stats {
|
65 | 64 | /// (aside from metadata-related ones).
|
66 | 65 | pub struct SharedCrateContext<'a, 'tcx: 'a> {
|
67 | 66 | exported_symbols: NodeSet,
|
68 |
| - link_meta: LinkMeta, |
69 | 67 | tcx: TyCtxt<'a, 'tcx, 'tcx>,
|
70 | 68 | empty_param_env: ty::ParameterEnvironment<'tcx>,
|
71 | 69 | stats: Stats,
|
@@ -316,7 +314,6 @@ pub unsafe fn create_context_and_module(sess: &Session, mod_name: &str) -> (Cont
|
316 | 314 |
|
317 | 315 | impl<'b, 'tcx> SharedCrateContext<'b, 'tcx> {
|
318 | 316 | pub fn new(tcx: TyCtxt<'b, 'tcx, 'tcx>,
|
319 |
| - link_meta: LinkMeta, |
320 | 317 | exported_symbols: NodeSet,
|
321 | 318 | check_overflow: bool)
|
322 | 319 | -> SharedCrateContext<'b, 'tcx> {
|
@@ -367,7 +364,6 @@ impl<'b, 'tcx> SharedCrateContext<'b, 'tcx> {
|
367 | 364 |
|
368 | 365 | SharedCrateContext {
|
369 | 366 | exported_symbols: exported_symbols,
|
370 |
| - link_meta: link_meta, |
371 | 367 | empty_param_env: tcx.empty_parameter_environment(),
|
372 | 368 | tcx: tcx,
|
373 | 369 | stats: Stats {
|
@@ -409,10 +405,6 @@ impl<'b, 'tcx> SharedCrateContext<'b, 'tcx> {
|
409 | 405 | &self.project_cache
|
410 | 406 | }
|
411 | 407 |
|
412 |
| - pub fn link_meta<'a>(&'a self) -> &'a LinkMeta { |
413 |
| - &self.link_meta |
414 |
| - } |
415 |
| - |
416 | 408 | pub fn tcx<'a>(&'a self) -> TyCtxt<'a, 'tcx, 'tcx> {
|
417 | 409 | self.tcx
|
418 | 410 | }
|
@@ -440,7 +432,7 @@ impl<'b, 'tcx> SharedCrateContext<'b, 'tcx> {
|
440 | 432 | pub fn metadata_symbol_name(&self) -> String {
|
441 | 433 | format!("rust_metadata_{}_{}",
|
442 | 434 | self.tcx().crate_name(LOCAL_CRATE),
|
443 |
| - self.link_meta().crate_hash) |
| 435 | + self.tcx().crate_disambiguator(LOCAL_CRATE)) |
444 | 436 | }
|
445 | 437 | }
|
446 | 438 |
|
|
0 commit comments