diff options
Diffstat (limited to 'src/librustc_codegen_llvm/common.rs')
| -rw-r--r-- | src/librustc_codegen_llvm/common.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/librustc_codegen_llvm/common.rs b/src/librustc_codegen_llvm/common.rs index c713362440d..0b23aac5224 100644 --- a/src/librustc_codegen_llvm/common.rs +++ b/src/librustc_codegen_llvm/common.rs @@ -12,7 +12,7 @@ use rustc_codegen_ssa::traits::*; use crate::consts::const_alloc_to_llvm; use rustc::ty::layout::{HasDataLayout, LayoutOf, self, TyLayout, Size}; -use rustc::mir::interpret::{Scalar, AllocKind, Allocation}; +use rustc::mir::interpret::{Scalar, GlobalAlloc, Allocation}; use rustc_codegen_ssa::mir::place::PlaceRef; use libc::{c_uint, c_char}; @@ -310,7 +310,7 @@ impl ConstMethods<'tcx> for CodegenCx<'ll, 'tcx> { Scalar::Ptr(ptr) => { let alloc_kind = self.tcx.alloc_map.lock().get(ptr.alloc_id); let base_addr = match alloc_kind { - Some(AllocKind::Memory(alloc)) => { + Some(GlobalAlloc::Memory(alloc)) => { let init = const_alloc_to_llvm(self, alloc); if alloc.mutability == Mutability::Mutable { self.static_addr_of_mut(init, alloc.align, None) @@ -318,10 +318,10 @@ impl ConstMethods<'tcx> for CodegenCx<'ll, 'tcx> { self.static_addr_of(init, alloc.align, None) } } - Some(AllocKind::Function(fn_instance)) => { + Some(GlobalAlloc::Function(fn_instance)) => { self.get_fn(fn_instance) } - Some(AllocKind::Static(def_id)) => { + Some(GlobalAlloc::Static(def_id)) => { assert!(self.tcx.is_static(def_id)); self.get_static(def_id) } |
