diff options
| author | Eduard-Mihai Burtescu <eddyb@lyken.rs> | 2021-09-02 00:09:34 +0300 |
|---|---|---|
| committer | Eduard-Mihai Burtescu <eddyb@lyken.rs> | 2021-09-18 04:41:29 +0300 |
| commit | e9b68304efc447a7bcd35b06511f6dfdfe9da16d (patch) | |
| tree | 43609e5fc3b6b2d7abbbe3e49e6dce498e9a3b91 /compiler/rustc_codegen_llvm/src/callee.rs | |
| parent | 319dec89e7cee269a4a9b029a2da846bb76ea813 (diff) | |
ty::layout: replicate `layout_of` setup for `fn_abi_of_{fn_ptr,instance}`.
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/callee.rs')
| -rw-r--r-- | compiler/rustc_codegen_llvm/src/callee.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/rustc_codegen_llvm/src/callee.rs b/compiler/rustc_codegen_llvm/src/callee.rs index bb16c90cd12..1a2aea015b1 100644 --- a/compiler/rustc_codegen_llvm/src/callee.rs +++ b/compiler/rustc_codegen_llvm/src/callee.rs @@ -4,7 +4,7 @@ //! and methods are represented as just a fn ptr and not a full //! closure. -use crate::abi::{FnAbi, FnAbiLlvmExt}; +use crate::abi::FnAbiLlvmExt; use crate::attributes; use crate::context::CodegenCx; use crate::llvm; @@ -12,7 +12,7 @@ use crate::value::Value; use rustc_codegen_ssa::traits::*; use tracing::debug; -use rustc_middle::ty::layout::{FnAbiExt, HasTyCtxt}; +use rustc_middle::ty::layout::{FnAbiOf, HasTyCtxt}; use rustc_middle::ty::{self, Instance, TypeFoldable}; /// Codegens a reference to a fn/method item, monomorphizing and @@ -42,7 +42,7 @@ pub fn get_fn(cx: &CodegenCx<'ll, 'tcx>, instance: Instance<'tcx>) -> &'ll Value sym ); - let fn_abi = FnAbi::of_instance(cx, instance, &[]); + let fn_abi = cx.fn_abi_of_instance(instance, &[]); let llfn = if let Some(llfn) = cx.get_declared_value(&sym) { // Create a fn pointer with the new signature. |
