Auto merge of #92816 - tmiasko:rm-llvm-asm, r=Amanieu
Remove deprecated LLVM-style inline assembly The `llvm_asm!` was deprecated back in #87590 1.56.0, with intention to remove it once `asm!` was stabilized, which already happened in #91728 1.59.0. Now it is time to remove `llvm_asm!` to avoid continued maintenance cost. Closes #70173. Closes #92794. Closes #87612. Closes #82065. cc `@rust-lang/wg-inline-asm` r? `@Amanieu`
This commit is contained in:
commit
a34c079752
171 changed files with 235 additions and 3297 deletions
|
@ -226,7 +226,6 @@ impl<'hir> LoweringContext<'_, 'hir> {
|
|||
ExprKind::InlineAsm(ref asm) => {
|
||||
hir::ExprKind::InlineAsm(self.lower_inline_asm(e.span, asm))
|
||||
}
|
||||
ExprKind::LlvmInlineAsm(ref asm) => self.lower_expr_llvm_asm(asm),
|
||||
ExprKind::Struct(ref se) => {
|
||||
let rest = match &se.rest {
|
||||
StructRest::Base(e) => Some(self.lower_expr(e)),
|
||||
|
@ -1286,38 +1285,6 @@ impl<'hir> LoweringContext<'_, 'hir> {
|
|||
result
|
||||
}
|
||||
|
||||
fn lower_expr_llvm_asm(&mut self, asm: &LlvmInlineAsm) -> hir::ExprKind<'hir> {
|
||||
let inner = hir::LlvmInlineAsmInner {
|
||||
inputs: asm.inputs.iter().map(|&(c, _)| c).collect(),
|
||||
outputs: asm
|
||||
.outputs
|
||||
.iter()
|
||||
.map(|out| hir::LlvmInlineAsmOutput {
|
||||
constraint: out.constraint,
|
||||
is_rw: out.is_rw,
|
||||
is_indirect: out.is_indirect,
|
||||
span: self.lower_span(out.expr.span),
|
||||
})
|
||||
.collect(),
|
||||
asm: asm.asm,
|
||||
asm_str_style: asm.asm_str_style,
|
||||
clobbers: asm.clobbers.clone(),
|
||||
volatile: asm.volatile,
|
||||
alignstack: asm.alignstack,
|
||||
dialect: asm.dialect,
|
||||
};
|
||||
let hir_asm = hir::LlvmInlineAsm {
|
||||
inner,
|
||||
inputs_exprs: self.arena.alloc_from_iter(
|
||||
asm.inputs.iter().map(|&(_, ref input)| self.lower_expr_mut(input)),
|
||||
),
|
||||
outputs_exprs: self
|
||||
.arena
|
||||
.alloc_from_iter(asm.outputs.iter().map(|out| self.lower_expr_mut(&out.expr))),
|
||||
};
|
||||
hir::ExprKind::LlvmInlineAsm(self.arena.alloc(hir_asm))
|
||||
}
|
||||
|
||||
fn lower_expr_field(&mut self, f: &ExprField) -> hir::ExprField<'hir> {
|
||||
hir::ExprField {
|
||||
hir_id: self.next_id(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue