rustc_target: rename Arch::{Uknown,Other}
Prepare for additional enums like Vendor and Os which have true `Unknown` variants. We want to use the same name for the escape hatch for all of these, thus rename this one.
This commit is contained in:
parent
c6f924c182
commit
a1122a1088
5 changed files with 8 additions and 8 deletions
|
|
@ -273,7 +273,7 @@ impl InlineAsmArch {
|
|||
Arch::Msp430 => Some(Self::Msp430),
|
||||
Arch::M68k => Some(Self::M68k),
|
||||
Arch::CSky => Some(Self::CSKY),
|
||||
Arch::AmdGpu | Arch::Xtensa | Arch::Unknown(_) => None,
|
||||
Arch::AmdGpu | Arch::Xtensa | Arch::Other(_) => None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -702,7 +702,7 @@ impl<'a, Ty> FnAbi<'a, Ty> {
|
|||
Arch::RiscV32 | Arch::RiscV64 => riscv::compute_abi_info(cx, self),
|
||||
Arch::Wasm32 | Arch::Wasm64 => wasm::compute_abi_info(cx, self),
|
||||
Arch::Bpf => bpf::compute_abi_info(cx, self),
|
||||
arch @ (Arch::PowerPC64LE | Arch::SpirV | Arch::Unknown(_)) => {
|
||||
arch @ (Arch::PowerPC64LE | Arch::SpirV | Arch::Other(_)) => {
|
||||
panic!("no lowering implemented for {arch}")
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1884,7 +1884,7 @@ crate::target_spec_enum! {
|
|||
X86_64 = "x86_64",
|
||||
Xtensa = "xtensa",
|
||||
}
|
||||
other_variant = Unknown;
|
||||
other_variant = Other;
|
||||
}
|
||||
|
||||
impl Arch {
|
||||
|
|
@ -1921,7 +1921,7 @@ impl Arch {
|
|||
Self::X86 => sym::x86,
|
||||
Self::X86_64 => sym::x86_64,
|
||||
Self::Xtensa => sym::xtensa,
|
||||
Self::Unknown(name) => rustc_span::Symbol::intern(name),
|
||||
Self::Other(name) => rustc_span::Symbol::intern(name),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -3298,7 +3298,7 @@ impl Target {
|
|||
| Arch::SpirV
|
||||
| Arch::Wasm32
|
||||
| Arch::Wasm64
|
||||
| Arch::Unknown(_) => return None,
|
||||
| Arch::Other(_) => return None,
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -977,7 +977,7 @@ impl Target {
|
|||
| Arch::PowerPC64LE
|
||||
| Arch::SpirV
|
||||
| Arch::Xtensa
|
||||
| Arch::Unknown(_) => &[],
|
||||
| Arch::Other(_) => &[],
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1006,7 +1006,7 @@ impl Target {
|
|||
| Arch::PowerPC64LE
|
||||
| Arch::SpirV
|
||||
| Arch::Xtensa
|
||||
| Arch::Unknown(_) => &[],
|
||||
| Arch::Other(_) => &[],
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
|
|||
| Arch::Nvptx64
|
||||
| Arch::PowerPC64LE
|
||||
| Arch::SpirV
|
||||
| Arch::Unknown(_)) => bug!("unsupported target architecture for malloc: `{arch}`"),
|
||||
| Arch::Other(_)) => bug!("unsupported target architecture for malloc: `{arch}`"),
|
||||
};
|
||||
// The C standard only requires sufficient alignment for any *type* with size less than or
|
||||
// equal to the size requested. Types one can define in standard C seem to never have an alignment
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue