Skip to content

Commit

Permalink
Fix type_use for inline asm.
Browse files Browse the repository at this point in the history
  • Loading branch information
luqmana committed Mar 16, 2013
1 parent d68b98a commit 83f2d4a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 12 deletions.
10 changes: 1 addition & 9 deletions src/librustc/middle/moves.rs
Original file line number Diff line number Diff line change
Expand Up @@ -558,15 +558,7 @@ pub impl VisitContext {
self.use_expr(base, Read, visitor);
}

expr_inline_asm(_, ref ins, ref outs, _, _, _) => {
for ins.each |&(c, in)| {
// XXX: Do something?
}
for outs.each |&(c, out)| {
// XXX: Do something?
}
}

expr_inline_asm(*) |
expr_break(*) |
expr_again(*) |
expr_lit(*) => {}
Expand Down
7 changes: 6 additions & 1 deletion src/librustc/middle/trans/type_use.rs
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,12 @@ pub fn mark_for_expr(cx: Context, e: @expr) {
}

expr_inline_asm(_, ref ins, ref outs, _, _, _) => {
// XXX Do something, maybe?
for ins.each |&(_, in)| {
node_type_needs(cx, use_repr, in.id);
}
for outs.each |&(_, out)| {
node_type_needs(cx, use_repr, out.id);
}
}

expr_paren(e) => mark_for_expr(cx, e),
Expand Down
4 changes: 2 additions & 2 deletions src/libsyntax/visit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -563,10 +563,10 @@ pub fn visit_expr<E>(ex: @expr, e: E, v: vt<E>) {
expr_mac(ref mac) => visit_mac((*mac), e, v),
expr_paren(x) => (v.visit_expr)(x, e, v),
expr_inline_asm(_, ins, outs, _, _, _) => {
for ins.each |&(c, in)| {
for ins.each |&(_, in)| {
(v.visit_expr)(in, e, v);
}
for outs.each |&(c, out)| {
for outs.each |&(_, out)| {
(v.visit_expr)(out, e, v);
}
}
Expand Down

9 comments on commit 83f2d4a

@bors
Copy link
Contributor

@bors bors commented on 83f2d4a Mar 16, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

saw approval from pcwalton
at luqmana@83f2d4a

@bors
Copy link
Contributor

@bors bors commented on 83f2d4a Mar 16, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merging luqmana/rust/inline-asm = 83f2d4a into auto

@bors
Copy link
Contributor

@bors bors commented on 83f2d4a Mar 16, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

luqmana/rust/inline-asm = 83f2d4a merged ok, testing candidate = 7a4a03a6

@bors
Copy link
Contributor

@bors bors commented on 83f2d4a Mar 16, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bors
Copy link
Contributor

@bors bors commented on 83f2d4a Mar 16, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

saw approval from pcwalton
at luqmana@83f2d4a

@bors
Copy link
Contributor

@bors bors commented on 83f2d4a Mar 16, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merging luqmana/rust/inline-asm = 83f2d4a into auto

@bors
Copy link
Contributor

@bors bors commented on 83f2d4a Mar 16, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

luqmana/rust/inline-asm = 83f2d4a merged ok, testing candidate = dc5ad50

@bors
Copy link
Contributor

@bors bors commented on 83f2d4a Mar 16, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bors
Copy link
Contributor

@bors bors commented on 83f2d4a Mar 16, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fast-forwarding incoming to auto = dc5ad50

Please sign in to comment.