Skip to content

Commit b804e2e

Browse files
committed
---
yaml --- r: 271547 b: refs/heads/auto c: 4c52745 h: refs/heads/master i: 271545: 35fde99 271543: 40502d9
1 parent f7f3b47 commit b804e2e

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
@@ -8,7 +8,7 @@ refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
88
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
99
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1010
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
11-
refs/heads/auto: b385ce12232a6c192b168b75ec9867a5a83d2036
11+
refs/heads/auto: 4c527457f147881dc864b8b737c4288540b32208
1212
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c
1313
refs/tags/0.1: b19db808c2793fe2976759b85a355c3ad8c8b336
1414
refs/tags/0.2: 1754d02027f2924bed83b0160ee340c7f41d5ea1

branches/auto/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/auto/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/auto/src/librustc_trans/trans/link_guard.rs

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

branches/auto/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)