Remove deprecated LLVM-style inline assembly
This commit is contained in:
parent
72e74d7b9c
commit
000b36c505
68 changed files with 27 additions and 1132 deletions
|
@ -30,7 +30,6 @@ macro_rules! arena_types {
|
|||
[] impl_item_ref: rustc_hir::ImplItemRef,
|
||||
[] item: rustc_hir::Item<'tcx>,
|
||||
[] inline_asm: rustc_hir::InlineAsm<'tcx>,
|
||||
[] llvm_inline_asm: rustc_hir::LlvmInlineAsm<'tcx>,
|
||||
[] local: rustc_hir::Local<'tcx>,
|
||||
[] mod_: rustc_hir::Mod<'tcx>,
|
||||
[] owner_info: rustc_hir::OwnerInfo<'tcx>,
|
||||
|
|
|
@ -5,8 +5,8 @@ use crate::intravisit::FnKind;
|
|||
use crate::LangItem;
|
||||
|
||||
use rustc_ast::util::parser::ExprPrecedence;
|
||||
use rustc_ast::{self as ast, CrateSugar, LlvmAsmDialect};
|
||||
use rustc_ast::{Attribute, FloatTy, IntTy, Label, LitKind, StrStyle, TraitObjectSyntax, UintTy};
|
||||
use rustc_ast::{self as ast, CrateSugar};
|
||||
use rustc_ast::{Attribute, FloatTy, IntTy, Label, LitKind, TraitObjectSyntax, UintTy};
|
||||
pub use rustc_ast::{BorrowKind, ImplPolarity, IsAuto};
|
||||
pub use rustc_ast::{CaptureBy, Movability, Mutability};
|
||||
use rustc_ast::{InlineAsmOptions, InlineAsmTemplatePiece};
|
||||
|
@ -1471,7 +1471,6 @@ impl Expr<'_> {
|
|||
ExprKind::Continue(..) => ExprPrecedence::Continue,
|
||||
ExprKind::Ret(..) => ExprPrecedence::Ret,
|
||||
ExprKind::InlineAsm(..) => ExprPrecedence::InlineAsm,
|
||||
ExprKind::LlvmInlineAsm(..) => ExprPrecedence::InlineAsm,
|
||||
ExprKind::Struct(..) => ExprPrecedence::Struct,
|
||||
ExprKind::Repeat(..) => ExprPrecedence::Repeat,
|
||||
ExprKind::Yield(..) => ExprPrecedence::Yield,
|
||||
|
@ -1531,7 +1530,6 @@ impl Expr<'_> {
|
|||
| ExprKind::Loop(..)
|
||||
| ExprKind::Assign(..)
|
||||
| ExprKind::InlineAsm(..)
|
||||
| ExprKind::LlvmInlineAsm(..)
|
||||
| ExprKind::AssignOp(..)
|
||||
| ExprKind::Lit(_)
|
||||
| ExprKind::ConstBlock(..)
|
||||
|
@ -1614,7 +1612,6 @@ impl Expr<'_> {
|
|||
| ExprKind::Loop(..)
|
||||
| ExprKind::Assign(..)
|
||||
| ExprKind::InlineAsm(..)
|
||||
| ExprKind::LlvmInlineAsm(..)
|
||||
| ExprKind::AssignOp(..)
|
||||
| ExprKind::ConstBlock(..)
|
||||
| ExprKind::Box(..)
|
||||
|
@ -1755,8 +1752,6 @@ pub enum ExprKind<'hir> {
|
|||
|
||||
/// Inline assembly (from `asm!`), with its outputs and inputs.
|
||||
InlineAsm(&'hir InlineAsm<'hir>),
|
||||
/// Inline assembly (from `llvm_asm!`), with its outputs and inputs.
|
||||
LlvmInlineAsm(&'hir LlvmInlineAsm<'hir>),
|
||||
|
||||
/// A struct or struct-like variant literal expression.
|
||||
///
|
||||
|
@ -2368,36 +2363,6 @@ pub struct InlineAsm<'hir> {
|
|||
pub line_spans: &'hir [Span],
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone, Encodable, Decodable, Debug, Hash, HashStable_Generic, PartialEq)]
|
||||
pub struct LlvmInlineAsmOutput {
|
||||
pub constraint: Symbol,
|
||||
pub is_rw: bool,
|
||||
pub is_indirect: bool,
|
||||
pub span: Span,
|
||||
}
|
||||
|
||||
// NOTE(eddyb) This is used within MIR as well, so unlike the rest of the HIR,
|
||||
// it needs to be `Clone` and `Decodable` and use plain `Vec<T>` instead of
|
||||
// arena-allocated slice.
|
||||
#[derive(Clone, Encodable, Decodable, Debug, Hash, HashStable_Generic, PartialEq)]
|
||||
pub struct LlvmInlineAsmInner {
|
||||
pub asm: Symbol,
|
||||
pub asm_str_style: StrStyle,
|
||||
pub outputs: Vec<LlvmInlineAsmOutput>,
|
||||
pub inputs: Vec<Symbol>,
|
||||
pub clobbers: Vec<Symbol>,
|
||||
pub volatile: bool,
|
||||
pub alignstack: bool,
|
||||
pub dialect: LlvmAsmDialect,
|
||||
}
|
||||
|
||||
#[derive(Debug, HashStable_Generic)]
|
||||
pub struct LlvmInlineAsm<'hir> {
|
||||
pub inner: LlvmInlineAsmInner,
|
||||
pub outputs_exprs: &'hir [Expr<'hir>],
|
||||
pub inputs_exprs: &'hir [Expr<'hir>],
|
||||
}
|
||||
|
||||
/// Represents a parameter in a function header.
|
||||
#[derive(Debug, HashStable_Generic)]
|
||||
pub struct Param<'hir> {
|
||||
|
|
|
@ -1251,10 +1251,6 @@ pub fn walk_expr<'v, V: Visitor<'v>>(visitor: &mut V, expression: &'v Expr<'v>)
|
|||
ExprKind::InlineAsm(ref asm) => {
|
||||
walk_inline_asm(visitor, asm);
|
||||
}
|
||||
ExprKind::LlvmInlineAsm(ref asm) => {
|
||||
walk_list!(visitor, visit_expr, asm.outputs_exprs);
|
||||
walk_list!(visitor, visit_expr, asm.inputs_exprs);
|
||||
}
|
||||
ExprKind::Yield(ref subexpression, _) => {
|
||||
visitor.visit_expr(subexpression);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue