mirror of
https://github.com/fluencelabs/wasmer
synced 2025-06-23 13:41:32 +00:00
Don't create functions for imports, we still call those indirectly.
This commit is contained in:
@ -8228,12 +8228,14 @@ impl ModuleCodeGenerator<LLVMFunctionCodeGenerator, LLVMBackend, CodegenError>
|
|||||||
assoc: Map<FuncIndex, SigIndex>,
|
assoc: Map<FuncIndex, SigIndex>,
|
||||||
) -> Result<(), CodegenError> {
|
) -> Result<(), CodegenError> {
|
||||||
for (index, sig_id) in &assoc {
|
for (index, sig_id) in &assoc {
|
||||||
let function = self.module.borrow_mut().add_function(
|
if index.index() >= self.func_import_count {
|
||||||
&format!("fn{}", index.index()),
|
let function = self.module.borrow_mut().add_function(
|
||||||
self.signatures[*sig_id],
|
&format!("fn{}", index.index()),
|
||||||
Some(Linkage::External),
|
self.signatures[*sig_id],
|
||||||
);
|
Some(Linkage::External),
|
||||||
self.llvm_functions.borrow_mut().insert(index, function);
|
);
|
||||||
|
self.llvm_functions.borrow_mut().insert(index, function);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
self.function_signatures = Some(Arc::new(assoc));
|
self.function_signatures = Some(Arc::new(assoc));
|
||||||
Ok(())
|
Ok(())
|
||||||
|
Reference in New Issue
Block a user