Skip to content

Commit d9d1958

Browse files
committed
---
yaml --- r: 273585 b: refs/heads/beta c: 4c52745 h: refs/heads/master i: 273583: ee21c2d
1 parent 5972ff7 commit d9d1958

File tree

5 files changed

+1
-163
lines changed

5 files changed

+1
-163
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ refs/tags/0.9: 36870b185fc5f5486636d4515f0e22677493f225
2323
refs/tags/0.10: ac33f2b15782272ae348dbd7b14b8257b2148b5a
2424
refs/tags/0.11.0: e1247cb1d0d681be034adb4b558b5a0c0d5720f9
2525
refs/tags/0.12.0: f0c419429ef30723ceaf6b42f9b5a2aeb5d2e2d1
26-
refs/heads/beta: b385ce12232a6c192b168b75ec9867a5a83d2036
26+
refs/heads/beta: 4c527457f147881dc864b8b737c4288540b32208
2727
refs/tags/1.0.0-alpha: e42bd6d93a1d3433c486200587f8f9e12590a4d7
2828
refs/heads/tmp: e06d2ad9fcd5027bcaac5b08fc9aa39a49d0ecd3
2929
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f

branches/beta/src/librustc_trans/back/linker.rs

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ use session::config::CrateTypeDylib;
2323
use session::config;
2424
use syntax::ast;
2525
use trans::CrateTranslation;
26-
use trans::link_guard;
2726

2827
/// Linker abstraction used by back::link to build up the command to invoke a
2928
/// linker.
@@ -361,25 +360,6 @@ impl<'a> Linker for MsvcLinker<'a> {
361360
writeln!(f, " {}", symbol)?;
362361
}
363362

364-
// Add link-guard symbols
365-
{
366-
// local crate
367-
let symbol = link_guard::link_guard_name(&trans.link.crate_name[..],
368-
&trans.link.crate_hash);
369-
try!(writeln!(f, " {}", symbol));
370-
}
371-
// statically linked dependencies
372-
for (i, format) in formats[&CrateTypeDylib].iter().enumerate() {
373-
if *format == Linkage::Static {
374-
let cnum = (i + 1) as ast::CrateNum;
375-
let crate_name = cstore.original_crate_name(cnum);
376-
let svh = cstore.crate_hash(cnum);
377-
378-
let symbol = link_guard::link_guard_name(&crate_name[..], &svh);
379-
try!(writeln!(f, " {}", symbol));
380-
}
381-
}
382-
383363
Ok(())
384364
})();
385365
if let Err(e) = res {

branches/beta/src/librustc_trans/trans/base.rs

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,6 @@ use trans::expr;
7979
use trans::glue;
8080
use trans::inline;
8181
use trans::intrinsic;
82-
use trans::link_guard;
8382
use trans::machine;
8483
use trans::machine::{llalign_of_min, llsize_of, llsize_of_real};
8584
use trans::meth;
@@ -2384,7 +2383,6 @@ pub fn create_entry_wrapper(ccx: &CrateContext, sp: Span, main_llfn: ValueRef) {
23842383
unsafe {
23852384
llvm::LLVMPositionBuilderAtEnd(bld, llbb);
23862385

2387-
link_guard::insert_reference_to_link_guard(ccx, llbb);
23882386
debuginfo::gdb::insert_reference_to_gdb_debug_scripts_section_global(ccx);
23892387

23902388
let (start_fn, args) = if use_start_lang_item {
@@ -2763,8 +2761,6 @@ pub fn trans_crate<'tcx>(tcx: &TyCtxt<'tcx>,
27632761
symbol_names_test::report_symbol_names(&ccx);
27642762
}
27652763

2766-
emit_link_guard_if_necessary(&shared_ccx);
2767-
27682764
for ccx in shared_ccx.iter() {
27692765
if ccx.sess().opts.debuginfo != NoDebugInfo {
27702766
debuginfo::finalize(&ccx);
@@ -2825,8 +2821,6 @@ pub fn trans_crate<'tcx>(tcx: &TyCtxt<'tcx>,
28252821
if sess.entry_fn.borrow().is_some() {
28262822
reachable_symbols.push("main".to_string());
28272823
}
2828-
reachable_symbols.push(link_guard::link_guard_name(&link_meta.crate_name,
2829-
&link_meta.crate_hash));
28302824

28312825
// For the purposes of LTO, we add to the reachable set all of the upstream
28322826
// reachable extern fns. These functions are all part of the public ABI of
@@ -2870,24 +2864,6 @@ pub fn trans_crate<'tcx>(tcx: &TyCtxt<'tcx>,
28702864
}
28712865
}
28722866

2873-
fn emit_link_guard_if_necessary(shared_ccx: &SharedCrateContext) {
2874-
let link_meta = shared_ccx.link_meta();
2875-
let link_guard_name = link_guard::link_guard_name(&link_meta.crate_name,
2876-
&link_meta.crate_hash);
2877-
let link_guard_name = CString::new(link_guard_name).unwrap();
2878-
2879-
// Check if the link-guard has already been emitted in a codegen unit
2880-
let link_guard_already_emitted = shared_ccx.iter().any(|ccx| {
2881-
let link_guard = unsafe { llvm::LLVMGetNamedValue(ccx.llmod(),
2882-
link_guard_name.as_ptr()) };
2883-
!link_guard.is_null()
2884-
});
2885-
2886-
if !link_guard_already_emitted {
2887-
link_guard::get_or_insert_link_guard(&shared_ccx.get_ccx(0));
2888-
}
2889-
}
2890-
28912867
/// We visit all the items in the krate and translate them. We do
28922868
/// this in two walks. The first walk just finds module items. It then
28932869
/// walks the full contents of those module items and translates all

branches/beta/src/librustc_trans/trans/link_guard.rs

Lines changed: 0 additions & 117 deletions
This file was deleted.

branches/beta/src/librustc_trans/trans/mod.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ mod expr;
5353
mod glue;
5454
mod inline;
5555
mod intrinsic;
56-
pub mod link_guard;
5756
mod machine;
5857
mod _match;
5958
mod meth;

0 commit comments

Comments
 (0)