Skip to content

Commit 543934f

Browse files
committed
---
yaml --- r: 72672 b: refs/heads/dist-snap c: ccf2f7b h: refs/heads/master v: v3
1 parent 35b4603 commit 543934f

File tree

8 files changed

+9
-15
lines changed

8 files changed

+9
-15
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c
99
refs/heads/incoming: b50030718cf28f2a5a81857a26b57442734fe854
10-
refs/heads/dist-snap: bf2d3c71e37d3b7aabe57a3d9ea3fada449715c1
10+
refs/heads/dist-snap: ccf2f7b979ad4e4defd9b856f6d16108c5760829
1111
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1212
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
1313
refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0

branches/dist-snap/src/librustc/driver/driver.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -600,11 +600,6 @@ pub fn build_session_options(binary: @~str,
600600
let target_opt = getopts::opt_maybe_str(matches, ~"target");
601601
let target_feature_opt = getopts::opt_maybe_str(matches, ~"target-feature");
602602
let save_temps = getopts::opt_present(matches, ~"save-temps");
603-
match output_type {
604-
// unless we're emitting huamn-readable assembly, omit comments.
605-
link::output_type_llvm_assembly | link::output_type_assembly => (),
606-
_ => debugging_opts |= session::no_asm_comments
607-
}
608603
let opt_level = {
609604
if (debugging_opts & session::no_opt) != 0 {
610605
No

branches/dist-snap/src/librustc/driver/session.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ pub static time_passes: uint = 1 << 1;
4545
pub static count_llvm_insns: uint = 1 << 2;
4646
pub static time_llvm_passes: uint = 1 << 3;
4747
pub static trans_stats: uint = 1 << 4;
48-
pub static no_asm_comments: uint = 1 << 5;
48+
pub static asm_comments: uint = 1 << 5;
4949
pub static no_verify: uint = 1 << 6;
5050
pub static trace: uint = 1 << 7;
5151
pub static coherence: uint = 1 << 8;
@@ -72,7 +72,7 @@ pub fn debugging_opts_map() -> ~[(~str, ~str, uint)] {
7272
(~"time-llvm-passes", ~"measure time of each LLVM pass",
7373
time_llvm_passes),
7474
(~"trans-stats", ~"gather trans statistics", trans_stats),
75-
(~"no-asm-comments", ~"omit comments when using -S", no_asm_comments),
75+
(~"asm-comments", ~"generate comments into the assembly (may change behavior)", asm_comments),
7676
(~"no-verify", ~"skip LLVM verification", no_verify),
7777
(~"trace", ~"emit trace logs", trace),
7878
(~"coherence", ~"perform coherence checking", coherence),
@@ -267,7 +267,7 @@ pub impl Session_ {
267267
}
268268
fn trans_stats(@self) -> bool { self.debugging_opt(trans_stats) }
269269
fn meta_stats(@self) -> bool { self.debugging_opt(meta_stats) }
270-
fn no_asm_comments(@self) -> bool { self.debugging_opt(no_asm_comments) }
270+
fn asm_comments(@self) -> bool { self.debugging_opt(asm_comments) }
271271
fn no_verify(@self) -> bool { self.debugging_opt(no_verify) }
272272
fn trace(@self) -> bool { self.debugging_opt(trace) }
273273
fn coherence(@self) -> bool { self.debugging_opt(coherence) }

branches/dist-snap/src/librustc/middle/borrowck/check_loans.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,7 @@ pub impl<'self> CheckLoanCtxt<'self> {
374374
}
375375
}
376376

377-
mc::cat_deref(base, deref_count, mc::gc_ptr(ast::m_mutbl)) => {
377+
mc::cat_deref(_, deref_count, mc::gc_ptr(ast::m_mutbl)) => {
378378
// Dynamically check writes to `@mut`
379379

380380
let key = root_map_key {

branches/dist-snap/src/librustc/middle/mem_categorization.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,6 @@ pub impl mem_categorization_ctxt {
378378
debug!("cat_expr: id=%d expr=%s",
379379
expr.id, pprust::expr_to_str(expr, self.tcx.sess.intr()));
380380

381-
let tcx = self.tcx;
382381
let expr_ty = self.expr_ty(expr);
383382
match expr.node {
384383
ast::expr_unary(ast::deref, e_base) => {

branches/dist-snap/src/librustc/middle/trans/base.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1133,7 +1133,7 @@ pub fn trans_stmt(cx: block, s: &ast::stmt) -> block {
11331133
let _icx = cx.insn_ctxt("trans_stmt");
11341134
debug!("trans_stmt(%s)", stmt_to_str(s, cx.tcx().sess.intr()));
11351135

1136-
if !cx.sess().no_asm_comments() {
1136+
if cx.sess().asm_comments() {
11371137
add_span_comment(cx, s.span, stmt_to_str(s, cx.ccx().sess.intr()));
11381138
}
11391139

branches/dist-snap/src/librustc/middle/trans/build.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -846,7 +846,7 @@ pub fn _UndefReturn(cx: block, Fn: ValueRef) -> ValueRef {
846846
847847
pub fn add_span_comment(bcx: block, sp: span, text: &str) {
848848
let ccx = bcx.ccx();
849-
if !ccx.sess.no_asm_comments() {
849+
if ccx.sess.asm_comments() {
850850
let s = fmt!("%s (%s)", text, ccx.sess.codemap.span_to_str(sp));
851851
debug!("%s", copy s);
852852
add_comment(bcx, s);
@@ -856,7 +856,7 @@ pub fn add_span_comment(bcx: block, sp: span, text: &str) {
856856
pub fn add_comment(bcx: block, text: &str) {
857857
unsafe {
858858
let ccx = bcx.ccx();
859-
if !ccx.sess.no_asm_comments() {
859+
if ccx.sess.asm_comments() {
860860
let sanitized = str::replace(text, ~"$", ~"");
861861
let comment_text = ~"# " +
862862
str::replace(sanitized, ~"\n", ~"\n\t# ");

branches/dist-snap/src/librustc/middle/trans/closure.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ pub fn store_environment(bcx: block,
224224
for vec::eachi(bound_values) |i, bv| {
225225
debug!("Copy %s into closure", bv.to_str(ccx));
226226

227-
if !ccx.sess.no_asm_comments() {
227+
if ccx.sess.asm_comments() {
228228
add_comment(bcx, fmt!("Copy %s into closure",
229229
bv.to_str(ccx)));
230230
}

0 commit comments

Comments
 (0)