about summary refs log tree commit diff
path: root/src/librustc_codegen_llvm
diff options
context:
space:
mode:
authorRalf Jung <post@ralfj.de>2018-09-21 23:32:59 +0200
committerRalf Jung <post@ralfj.de>2018-10-10 09:50:06 +0200
commit4e9f9329e3e2143b558a9ed80c220d5d01f6bd02 (patch)
tree9654d4182e144d37b8647e237aba2ed4397802da /src/librustc_codegen_llvm
parent4623d4889373702428251967d9bf6ff6d677ec1a (diff)
downloadrust-4e9f9329e3e2143b558a9ed80c220d5d01f6bd02.tar.gz
rust-4e9f9329e3e2143b558a9ed80c220d5d01f6bd02.zip
miri engine: basic support for pointer provenance tracking
Diffstat (limited to 'src/librustc_codegen_llvm')
-rw-r--r--src/librustc_codegen_llvm/mir/constant.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/librustc_codegen_llvm/mir/constant.rs b/src/librustc_codegen_llvm/mir/constant.rs
index ce18f31da69..9f0f7443890 100644
--- a/src/librustc_codegen_llvm/mir/constant.rs
+++ b/src/librustc_codegen_llvm/mir/constant.rs
@@ -92,7 +92,7 @@ pub fn const_alloc_to_llvm(cx: &CodegenCx<'ll, '_>, alloc: &Allocation) -> &'ll
     let pointer_size = layout.pointer_size.bytes() as usize;
 
     let mut next_offset = 0;
-    for &(offset, alloc_id) in alloc.relocations.iter() {
+    for &(offset, ((), alloc_id)) in alloc.relocations.iter() {
         let offset = offset.bytes();
         assert_eq!(offset as usize as u64, offset);
         let offset = offset as usize;
@@ -105,7 +105,7 @@ pub fn const_alloc_to_llvm(cx: &CodegenCx<'ll, '_>, alloc: &Allocation) -> &'ll
         ).expect("const_alloc_to_llvm: could not read relocation pointer") as u64;
         llvals.push(scalar_to_llvm(
             cx,
-            Pointer { alloc_id, offset: Size::from_bytes(ptr_offset) }.into(),
+            Pointer::new(alloc_id, Size::from_bytes(ptr_offset)).into(),
             &layout::Scalar {
                 value: layout::Primitive::Pointer,
                 valid_range: 0..=!0