1
Fork 0

add a Vtable kind of symbolic allocations

This commit is contained in:
Ralf Jung 2022-07-17 11:36:37 -04:00
parent a7468c60f8
commit da5e4d73f1
11 changed files with 106 additions and 15 deletions

View file

@ -101,7 +101,9 @@ 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(..) => AddressSpace::DATA,
GlobalAlloc::Static(..) | GlobalAlloc::Memory(..) | GlobalAlloc::Vtable(..) => {
AddressSpace::DATA
}
};
llvals.push(cx.scalar_to_backend(