Add asm label support to AST and HIR

This commit is contained in:
Gary Guo 2023-12-25 20:53:01 +00:00
parent 31b551fee9
commit a4b413d4fd
2 changed files with 4 additions and 0 deletions

View File

@ -255,6 +255,9 @@ fn never_loop_expr<'tcx>(
InlineAsmOperand::Const { .. } | InlineAsmOperand::SymFn { .. } | InlineAsmOperand::SymStatic { .. } => { InlineAsmOperand::Const { .. } | InlineAsmOperand::SymFn { .. } | InlineAsmOperand::SymStatic { .. } => {
NeverLoopResult::Normal NeverLoopResult::Normal
}, },
InlineAsmOperand::Label { block } => {
never_loop_block(cx, block, local_labels, main_loop_id)
}
})), })),
ExprKind::OffsetOf(_, _) ExprKind::OffsetOf(_, _)
| ExprKind::Yield(_, _) | ExprKind::Yield(_, _)

View File

@ -835,6 +835,7 @@ pub fn hash_expr(&mut self, e: &Expr<'_>) {
self.hash_body(anon_const.body); self.hash_body(anon_const.body);
}, },
InlineAsmOperand::SymStatic { path, def_id: _ } => self.hash_qpath(path), InlineAsmOperand::SymStatic { path, def_id: _ } => self.hash_qpath(path),
InlineAsmOperand::Label { block } => self.hash_block(block),
} }
} }
}, },