Skip to content

Commit 3fc682e

Browse files
committed
---
yaml --- r: 149111 b: refs/heads/try2 c: 95c53c0 h: refs/heads/master i: 149109: a79f053 149107: 52c6cfe 149103: 0192e54 v: v3
1 parent 3b1396a commit 3fc682e

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
@@ -5,7 +5,7 @@ refs/heads/snap-stage3: 78a7676898d9f80ab540c6df5d4c9ce35bb50463
55
refs/heads/try: 519addf6277dbafccbb4159db4b710c37eaa2ec5
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8-
refs/heads/try2: 8b760fd844fd43e331388a4d5c73304356058295
8+
refs/heads/try2: 95c53c049c9ced13c325c9aade22affbf5d97fa3
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

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