Add asm label support to THIR
This commit is contained in:
parent
93fa8579c6
commit
040ab7d4b6
5 changed files with 15 additions and 2 deletions
|
@ -455,6 +455,9 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
|
|||
thir::InlineAsmOperand::SymStatic { def_id } => {
|
||||
mir::InlineAsmOperand::SymStatic { def_id }
|
||||
}
|
||||
thir::InlineAsmOperand::Label { .. } => {
|
||||
todo!()
|
||||
}
|
||||
})
|
||||
.collect();
|
||||
|
||||
|
|
|
@ -656,8 +656,8 @@ impl<'tcx> Cx<'tcx> {
|
|||
hir::InlineAsmOperand::SymStatic { path: _, def_id } => {
|
||||
InlineAsmOperand::SymStatic { def_id }
|
||||
}
|
||||
hir::InlineAsmOperand::Label { .. } => {
|
||||
todo!()
|
||||
hir::InlineAsmOperand::Label { block } => {
|
||||
InlineAsmOperand::Label { block: self.mirror_block(block) }
|
||||
}
|
||||
})
|
||||
.collect(),
|
||||
|
|
|
@ -889,6 +889,12 @@ impl<'a, 'tcx> ThirPrinter<'a, 'tcx> {
|
|||
print_indented!(self, format!("def_id: {:?}", def_id), depth_lvl + 1);
|
||||
print_indented!(self, "}", depth_lvl + 1);
|
||||
}
|
||||
InlineAsmOperand::Label { block } => {
|
||||
print_indented!(self, "InlineAsmOperand::Block {", depth_lvl);
|
||||
print_indented!(self, "block:", depth_lvl + 1);
|
||||
self.print_block(*block, depth_lvl + 2);
|
||||
print_indented!(self, "}", depth_lvl + 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue