Implement asm goto in MIR and MIR lowering
This commit is contained in:
parent
b044aaa905
commit
3b1dd1bfa9
13 changed files with 53 additions and 17 deletions
|
@ -830,6 +830,9 @@ impl<'tcx> TerminatorKind<'tcx> {
|
|||
InlineAsmOperand::SymStatic { def_id } => {
|
||||
write!(fmt, "sym_static {def_id:?}")?;
|
||||
}
|
||||
InlineAsmOperand::Label { target_index } => {
|
||||
write!(fmt, "label {target_index}")?;
|
||||
}
|
||||
}
|
||||
}
|
||||
write!(fmt, ", options({options:?}))")
|
||||
|
|
|
@ -919,6 +919,10 @@ pub enum InlineAsmOperand<'tcx> {
|
|||
SymStatic {
|
||||
def_id: DefId,
|
||||
},
|
||||
Label {
|
||||
/// This represents the index into the `targets` array in `TerminatorKind::InlineAsm`.
|
||||
target_index: usize,
|
||||
},
|
||||
}
|
||||
|
||||
/// Type for MIR `Assert` terminator error messages.
|
||||
|
|
|
@ -595,7 +595,8 @@ macro_rules! make_mir_visitor {
|
|||
self.visit_constant(value, location);
|
||||
}
|
||||
InlineAsmOperand::Out { place: None, .. }
|
||||
| InlineAsmOperand::SymStatic { def_id: _ } => {}
|
||||
| InlineAsmOperand::SymStatic { def_id: _ }
|
||||
| InlineAsmOperand::Label { target_index: _ } => {}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue