consistently use VTable over Vtable (matching stable stdlib API RawWakerVTable)
This commit is contained in:
parent
114da84996
commit
3dad266f40
34 changed files with 90 additions and 88 deletions
|
@ -242,7 +242,7 @@ impl<'ll, 'tcx> ConstMethods<'tcx> for CodegenCx<'ll, 'tcx> {
|
|||
let (alloc_id, offset) = ptr.into_parts();
|
||||
// For vtables, get the underlying data allocation.
|
||||
let alloc_id = match self.tcx.global_alloc(alloc_id) {
|
||||
GlobalAlloc::Vtable(ty, trait_ref) => {
|
||||
GlobalAlloc::VTable(ty, trait_ref) => {
|
||||
self.tcx.vtable_allocation((ty, trait_ref))
|
||||
}
|
||||
_ => alloc_id,
|
||||
|
@ -264,7 +264,7 @@ impl<'ll, 'tcx> ConstMethods<'tcx> for CodegenCx<'ll, 'tcx> {
|
|||
self.get_fn_addr(fn_instance.polymorphize(self.tcx)),
|
||||
self.data_layout().instruction_address_space,
|
||||
),
|
||||
GlobalAlloc::Vtable(..) => bug!("vtables are already handled"),
|
||||
GlobalAlloc::VTable(..) => bug!("vtables are already handled"),
|
||||
GlobalAlloc::Static(def_id) => {
|
||||
assert!(self.tcx.is_static(def_id));
|
||||
assert!(!self.tcx.is_thread_local_static(def_id));
|
||||
|
|
|
@ -101,7 +101,7 @@ pub fn const_alloc_to_llvm<'ll>(cx: &CodegenCx<'ll, '_>, alloc: ConstAllocation<
|
|||
|
||||
let address_space = match cx.tcx.global_alloc(alloc_id) {
|
||||
GlobalAlloc::Function(..) => cx.data_layout().instruction_address_space,
|
||||
GlobalAlloc::Static(..) | GlobalAlloc::Memory(..) | GlobalAlloc::Vtable(..) => {
|
||||
GlobalAlloc::Static(..) | GlobalAlloc::Memory(..) | GlobalAlloc::VTable(..) => {
|
||||
AddressSpace::DATA
|
||||
}
|
||||
};
|
||||
|
|
|
@ -1420,7 +1420,7 @@ fn build_vtable_type_di_node<'ll, 'tcx>(
|
|||
cx,
|
||||
type_map::stub(
|
||||
cx,
|
||||
Stub::VtableTy { vtable_holder },
|
||||
Stub::VTableTy { vtable_holder },
|
||||
unique_type_id,
|
||||
&vtable_type_name,
|
||||
(size, pointer_align),
|
||||
|
|
|
@ -146,7 +146,7 @@ impl<'ll> DINodeCreationResult<'ll> {
|
|||
pub enum Stub<'ll> {
|
||||
Struct,
|
||||
Union,
|
||||
VtableTy { vtable_holder: &'ll DIType },
|
||||
VTableTy { vtable_holder: &'ll DIType },
|
||||
}
|
||||
|
||||
pub struct StubInfo<'ll, 'tcx> {
|
||||
|
@ -180,9 +180,9 @@ pub(super) fn stub<'ll, 'tcx>(
|
|||
let unique_type_id_str = unique_type_id.generate_unique_id_string(cx.tcx);
|
||||
|
||||
let metadata = match kind {
|
||||
Stub::Struct | Stub::VtableTy { .. } => {
|
||||
Stub::Struct | Stub::VTableTy { .. } => {
|
||||
let vtable_holder = match kind {
|
||||
Stub::VtableTy { vtable_holder } => Some(vtable_holder),
|
||||
Stub::VTableTy { vtable_holder } => Some(vtable_holder),
|
||||
_ => None,
|
||||
};
|
||||
unsafe {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue