about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2021-06-29 15:52:21 +0000
committerbors <bors@rust-lang.org>2021-06-29 15:52:21 +0000
commite98897e5dc9898707bf4331c43b2e76ab7e282fe (patch)
treeb676c09db0f7bbb80996a1e354dc58cc4ec010d5 /compiler/rustc_codegen_llvm/src
parent8971fff984e7a45ca6cdcd146816b4896a4ab1ea (diff)
parent97772bb1f230f4981c9af6614df1ebc09b12c4f6 (diff)
downloadrust-e98897e5dc9898707bf4331c43b2e76ab7e282fe.tar.gz
rust-e98897e5dc9898707bf4331c43b2e76ab7e282fe.zip
Auto merge of #86475 - crlf0710:miri_vtable_refactor, r=bjorn3
Change vtable memory representation to use tcx allocated allocations.

This fixes https://github.com/rust-lang/rust/issues/86324. However i suspect there's more to change before it can land.

r? `@bjorn3`
cc `@rust-lang/miri`
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
-rw-r--r--compiler/rustc_codegen_llvm/src/common.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/compiler/rustc_codegen_llvm/src/common.rs b/compiler/rustc_codegen_llvm/src/common.rs
index 58af9d4cd04..df5ad8ecc27 100644
--- a/compiler/rustc_codegen_llvm/src/common.rs
+++ b/compiler/rustc_codegen_llvm/src/common.rs
@@ -282,6 +282,10 @@ impl ConstMethods<'tcx> for CodegenCx<'ll, 'tcx> {
         }
     }
 
+    fn const_data_from_alloc(&self, alloc: &Allocation) -> Self::Value {
+        const_alloc_to_llvm(self, alloc)
+    }
+
     fn from_const_alloc(
         &self,
         layout: TyAndLayout<'tcx>,