Fix type_use for inline asm.

This commit is contained in:
Luqman Aden 2013-03-15 18:54:39 -07:00 committed by Luqman Aden
parent d68b98a5bf
commit 83f2d4ab3d
3 changed files with 9 additions and 12 deletions

View File

@ -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(*) => {}

View File

@ -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),

View File

@ -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);
}
}