Move vtable_size and vtable_align impls to cg_ssa
This commit is contained in:
parent
1afea1f86a
commit
399e020b96
2 changed files with 10 additions and 11 deletions
|
@ -10,7 +10,6 @@ use crate::value::Value;
|
|||
use rustc_codegen_ssa::base::{compare_simd_types, wants_msvc_seh};
|
||||
use rustc_codegen_ssa::common::span_invalid_monomorphization_error;
|
||||
use rustc_codegen_ssa::common::{IntPredicate, TypeKind};
|
||||
use rustc_codegen_ssa::meth;
|
||||
use rustc_codegen_ssa::mir::operand::OperandRef;
|
||||
use rustc_codegen_ssa::mir::place::PlaceRef;
|
||||
use rustc_codegen_ssa::traits::*;
|
||||
|
@ -364,16 +363,6 @@ impl<'ll, 'tcx> IntrinsicCallMethods<'tcx> for Builder<'_, 'll, 'tcx> {
|
|||
return;
|
||||
}
|
||||
|
||||
sym::vtable_size | sym::vtable_align => {
|
||||
let vtable = args[0].immediate();
|
||||
let idx = match name {
|
||||
sym::vtable_size => ty::COMMON_VTABLE_ENTRIES_SIZE,
|
||||
sym::vtable_align => ty::COMMON_VTABLE_ENTRIES_ALIGN,
|
||||
_ => bug!(),
|
||||
};
|
||||
meth::VirtualIndex::from_index(idx).get_usize(self, vtable)
|
||||
}
|
||||
|
||||
_ if name.as_str().starts_with("simd_") => {
|
||||
match generic_simd_intrinsic(self, name, callee_ty, args, ret_ty, llret_ty, span) {
|
||||
Ok(llval) => llval,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue