mirror of
https://github.com/mii443/wasmer.git
synced 2025-12-10 22:58:18 +00:00
Use abi::func_type_to_llvm when producing an LLVM function type from wasm types.
This renames `func_sig_to_llvm` to `func_type_to_llvm` and deletes the old version in intrinsics::. The new version returns a list of attributes along with the type. Update callers to set these attributes on the function or call site.
This commit is contained in:
@@ -1,8 +1,7 @@
|
||||
use crate::config::{CompiledFunctionKind, LLVMConfig};
|
||||
use crate::object_file::load_object_file;
|
||||
use crate::translator::intrinsics::{
|
||||
func_type_to_llvm, type_to_llvm, type_to_llvm_ptr, Intrinsics,
|
||||
};
|
||||
use crate::translator::abi::func_type_to_llvm;
|
||||
use crate::translator::intrinsics::{type_to_llvm, type_to_llvm_ptr, Intrinsics};
|
||||
use inkwell::{
|
||||
context::Context,
|
||||
module::Linkage,
|
||||
@@ -45,7 +44,8 @@ impl FuncTrampoline {
|
||||
module.set_data_layout(&target_machine.get_target_data().get_data_layout());
|
||||
let intrinsics = Intrinsics::declare(&module, &self.ctx);
|
||||
|
||||
let callee_ty = func_type_to_llvm(&self.ctx, &intrinsics, ty);
|
||||
// TODO: pass attrs to generate_trampoline.
|
||||
let (callee_ty, _) = func_type_to_llvm(&self.ctx, &intrinsics, ty);
|
||||
let trampoline_ty = intrinsics.void_ty.fn_type(
|
||||
&[
|
||||
intrinsics.ctx_ptr_ty.as_basic_type_enum(), // callee_vmctx ptr
|
||||
|
||||
Reference in New Issue
Block a user