diff options
| author | Denis Merigoux <denis.merigoux@gmail.com> | 2018-09-13 14:58:19 +0200 |
|---|---|---|
| committer | Eduard-Mihai Burtescu <edy.burt@gmail.com> | 2018-11-16 14:15:13 +0200 |
| commit | 034f69753b3e934789377cd6fa2b8c3f46364da0 (patch) | |
| tree | b5746f1c4883211b58111deec7c8b2b870c4d462 /src/librustc_codegen_llvm/context.rs | |
| parent | 484e07c231e29febc68f2f21e970f8eb19818ad6 (diff) | |
| download | rust-034f69753b3e934789377cd6fa2b8c3f46364da0.tar.gz rust-034f69753b3e934789377cd6fa2b8c3f46364da0.zip | |
Generalized base::unsized_info
Diffstat (limited to 'src/librustc_codegen_llvm/context.rs')
| -rw-r--r-- | src/librustc_codegen_llvm/context.rs | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/librustc_codegen_llvm/context.rs b/src/librustc_codegen_llvm/context.rs index cd0c2ffacd5..f9f162bb823 100644 --- a/src/librustc_codegen_llvm/context.rs +++ b/src/librustc_codegen_llvm/context.rs @@ -23,7 +23,7 @@ use value::Value; use monomorphize::partitioning::CodegenUnit; use type_::Type; use type_of::PointeeInfo; -use interfaces::{BaseTypeMethods, DerivedTypeMethods, IntrinsicDeclarationMethods}; +use interfaces::*; use rustc_data_structures::base_n; use rustc_data_structures::small_c_str::SmallCStr; @@ -322,7 +322,18 @@ impl<'b, 'tcx> CodegenCx<'b, 'tcx> { } } -impl IntrinsicDeclarationMethods for CodegenCx<'b, 'tcx> { +impl MiscMethods<'tcx> for CodegenCx<'ll, 'tcx> { + fn vtables(&self) -> &RefCell<FxHashMap<(Ty<'tcx>, + ty::PolyExistentialTraitRef<'tcx>), &'ll Value>> + { + &self.vtables + } + fn get_fn(&self, instance: Instance<'tcx>) -> &'ll Value { + callee::get_fn(&&self,instance) + } +} + +impl IntrinsicDeclarationMethods<'tcx> for CodegenCx<'b, 'tcx> { fn get_intrinsic(&self, key: &str) -> &'b Value { if let Some(v) = self.intrinsics.borrow().get(key).cloned() { return v; |
