Skip to content

Commit 7b2916f

Browse files
committed
---
yaml --- r: 100701 b: refs/heads/snap-stage3 c: 95c53c0 h: refs/heads/master i: 100699: 378be17 v: v3
1 parent 108a354 commit 7b2916f

File tree

2 files changed

+22
-20
lines changed

2 files changed

+22
-20
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: e3b1f3c443c048913e2d573fcc5a9c2be3484a78
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: 8b760fd844fd43e331388a4d5c73304356058295
4+
refs/heads/snap-stage3: 95c53c049c9ced13c325c9aade22affbf5d97fa3
55
refs/heads/try: a97642026c18a624ff6ea01075dd9550f8ed07ff
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b

branches/snap-stage3/src/librustc/back/link.rs

Lines changed: 21 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -361,21 +361,23 @@ pub mod write {
361361

362362
let mut llvm_c_strs = ~[];
363363
let mut llvm_args = ~[];
364-
let add = |arg: &str| {
365-
let s = arg.to_c_str();
366-
llvm_args.push(s.with_ref(|p| p));
367-
llvm_c_strs.push(s);
368-
};
369-
add("rustc"); // fake program name
370-
add("-arm-enable-ehabi");
371-
add("-arm-enable-ehabi-descriptors");
372-
if vectorize_loop { add("-vectorize-loops"); }
373-
if vectorize_slp { add("-vectorize-slp"); }
374-
if sess.time_llvm_passes() { add("-time-passes"); }
375-
if sess.print_llvm_passes() { add("-debug-pass=Structure"); }
376-
377-
for arg in sess.opts.cg.llvm_args.iter() {
378-
add(*arg);
364+
{
365+
let add = |arg: &str| {
366+
let s = arg.to_c_str();
367+
llvm_args.push(s.with_ref(|p| p));
368+
llvm_c_strs.push(s);
369+
};
370+
add("rustc"); // fake program name
371+
add("-arm-enable-ehabi");
372+
add("-arm-enable-ehabi-descriptors");
373+
if vectorize_loop { add("-vectorize-loops"); }
374+
if vectorize_slp { add("-vectorize-slp"); }
375+
if sess.time_llvm_passes() { add("-time-passes"); }
376+
if sess.print_llvm_passes() { add("-debug-pass=Structure"); }
377+
378+
for arg in sess.opts.cg.llvm_args.iter() {
379+
add(*arg);
380+
}
379381
}
380382

381383
INIT.doit(|| {
@@ -631,7 +633,7 @@ pub fn mangle(sess: Session, ss: ast_map::Path,
631633

632634
let mut n = ~"_ZN"; // _Z == Begin name-sequence, N == nested
633635

634-
let push = |s: &str| {
636+
let push = |n: &mut ~str, s: &str| {
635637
let sani = sanitize(s);
636638
n.push_str(format!("{}{}", sani.len(), sani));
637639
};
@@ -640,7 +642,7 @@ pub fn mangle(sess: Session, ss: ast_map::Path,
640642
for s in ss.iter() {
641643
match *s {
642644
PathName(s) | PathMod(s) | PathPrettyName(s, _) => {
643-
push(sess.str_of(s))
645+
push(&mut n, sess.str_of(s))
644646
}
645647
}
646648
}
@@ -665,10 +667,10 @@ pub fn mangle(sess: Session, ss: ast_map::Path,
665667
}
666668
}
667669
if hash.len() > 0 {
668-
push(hash);
670+
push(&mut n, hash);
669671
}
670672
match vers {
671-
Some(s) => push(s),
673+
Some(s) => push(&mut n, s),
672674
None => {}
673675
}
674676

0 commit comments

Comments
 (0)