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,6 +8228,7 @@ impl ModuleCodeGenerator<LLVMFunctionCodeGenerator, LLVMBackend, CodegenError>
|
||||
assoc: Map<FuncIndex, SigIndex>,
|
||||
) -> Result<(), CodegenError> {
|
||||
for (index, sig_id) in &assoc {
|
||||
if index.index() >= self.func_import_count {
|
||||
let function = self.module.borrow_mut().add_function(
|
||||
&format!("fn{}", index.index()),
|
||||
self.signatures[*sig_id],
|
||||
@ -8235,6 +8236,7 @@ impl ModuleCodeGenerator<LLVMFunctionCodeGenerator, LLVMBackend, CodegenError>
|
||||
);
|
||||
self.llvm_functions.borrow_mut().insert(index, function);
|
||||
}
|
||||
}
|
||||
self.function_signatures = Some(Arc::new(assoc));
|
||||
Ok(())
|
||||
}
|
||||
|
Reference in New Issue
Block a user