mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-16 04:55:22 +03:00
rustc: compute FnAbi's for virtual calls through FnAbi::of_instance.
This commit is contained in:
@@ -40,7 +40,7 @@ pub fn get_fn(
|
||||
let sym = tcx.symbol_name(instance).name.as_str();
|
||||
debug!("get_fn({:?}: {:?}) => {}", instance, instance.ty(cx.tcx()), sym);
|
||||
|
||||
let fn_abi = FnAbi::of_instance(cx, instance);
|
||||
let fn_abi = FnAbi::of_instance(cx, instance, &[]);
|
||||
|
||||
let llfn = if let Some(llfn) = cx.get_declared_value(&sym) {
|
||||
// Create a fn pointer with the new signature.
|
||||
|
||||
@@ -43,7 +43,7 @@ fn predefine_fn(&self,
|
||||
assert!(!instance.substs.needs_infer() &&
|
||||
!instance.substs.has_param_types());
|
||||
|
||||
let fn_abi = FnAbi::of_instance(self, instance);
|
||||
let fn_abi = FnAbi::of_instance(self, instance, &[]);
|
||||
let lldecl = self.declare_fn(symbol_name, &fn_abi);
|
||||
unsafe { llvm::LLVMRustSetLinkage(lldecl, base::linkage_to_llvm(linkage)) };
|
||||
let attrs = self.tcx.codegen_fn_attrs(instance.def_id());
|
||||
|
||||
Reference in New Issue
Block a user