Skip to content

Commit bf791a7

Browse files
committed
---
yaml --- r: 62813 b: refs/heads/snap-stage3 c: faf1afe h: refs/heads/master i: 62811: cfec683 v: v3
1 parent 42fa6d0 commit bf791a7

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+1811
-2888
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: 2d28d645422c1617be58c8ca7ad9a457264ca850
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: e3e55c5c042778b0e50710221d6c0abdfc1119f0
4+
refs/heads/snap-stage3: faf1afee16cfacf0318ca2b88bc4fa5e507418dd
55
refs/heads/try: 7b78b52e602bb3ea8174f9b2006bff3315f03ef9
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b

branches/snap-stage3/src/compiletest/compiletest.rc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212

1313
#[allow(non_camel_case_types)];
1414

15-
#[no_core]; // XXX: Remove after snapshot
1615
#[no_std];
1716

1817
extern mod core(name = "std", vers = "0.7-pre");

branches/snap-stage3/src/librust/rust.rc

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -152,15 +152,15 @@ fn cmd_help(args: &[~str]) -> ValidUsage {
152152
}
153153

154154
match args {
155-
[ref command_string] => print_usage(copy *command_string),
156-
_ => Invalid
155+
[command_string] => print_usage(command_string),
156+
_ => Invalid
157157
}
158158
}
159159

160160
fn cmd_test(args: &[~str]) -> ValidUsage {
161161
match args {
162-
[ref filename] => {
163-
let test_exec = Path(*filename).filestem().unwrap() + "test~";
162+
[filename] => {
163+
let test_exec = Path(filename).filestem().unwrap() + "test~";
164164
invoke("rustc", &[~"--test", filename.to_owned(),
165165
~"-o", test_exec.to_owned()], rustc::main);
166166
let exit_code = run::process_status(~"./" + test_exec, []);
@@ -172,8 +172,8 @@ fn cmd_test(args: &[~str]) -> ValidUsage {
172172

173173
fn cmd_run(args: &[~str]) -> ValidUsage {
174174
match args {
175-
[ref filename, ..prog_args] => {
176-
let exec = Path(*filename).filestem().unwrap() + "~";
175+
[filename, ..prog_args] => {
176+
let exec = Path(filename).filestem().unwrap() + "~";
177177
invoke("rustc", &[filename.to_owned(), ~"-o", exec.to_owned()],
178178
rustc::main);
179179
let exit_code = run::process_status(~"./"+exec, prog_args);

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

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,8 @@ pub mod write {
202202
output_type: output_type,
203203
output: &Path) {
204204
unsafe {
205+
llvm::LLVMInitializePasses();
206+
205207
let opts = sess.opts;
206208
if sess.time_llvm_passes() { llvm::LLVMRustEnableTimePasses(); }
207209
let td = mk_target_data(sess.targ_cfg.target_strs.data_layout);
@@ -232,14 +234,21 @@ pub mod write {
232234
let mut mpm = passes::PassManager::new(td.lltd);
233235

234236
if !sess.no_verify() {
235-
mpm.addPass(llvm::LLVMCreateVerifierPass());
237+
mpm.add_pass_from_name("verify");
236238
}
237239

238-
if sess.lint_llvm() {
239-
mpm.addPass(llvm::LLVMCreateLintPass());
240-
}
240+
let passes = if sess.opts.custom_passes.len() > 0 {
241+
copy sess.opts.custom_passes
242+
} else {
243+
if sess.lint_llvm() {
244+
mpm.add_pass_from_name("lint");
245+
}
246+
passes::create_standard_passes(opts.optimize)
247+
};
248+
241249

242-
passes::populatePassManager(&mut mpm, opts.optimize);
250+
debug!("Passes: %?", passes);
251+
passes::populate_pass_manager(sess, &mut mpm, passes);
243252

244253
debug!("Running Module Optimization Pass");
245254
mpm.run(llmod);

0 commit comments

Comments
 (0)