Implement MCG.next_function in other backends

This commit is contained in:
Brandon Fish 2019-05-19 11:45:16 -05:00
parent 47479b547f
commit e34e625009
2 changed files with 8 additions and 2 deletions

View File

@ -2473,7 +2473,10 @@ impl ModuleCodeGenerator<LLVMFunctionCodeGenerator, LLVMBackend, CodegenError>
Ok(()) Ok(())
} }
fn next_function(&mut self) -> Result<&mut LLVMFunctionCodeGenerator, CodegenError> { fn next_function(
&mut self,
_module_info: &ModuleInfo,
) -> Result<&mut LLVMFunctionCodeGenerator, CodegenError> {
// Creates a new function and returns the function-scope code generator for it. // Creates a new function and returns the function-scope code generator for it.
let (context, builder, intrinsics) = match self.functions.last_mut() { let (context, builder, intrinsics) = match self.functions.last_mut() {
Some(x) => ( Some(x) => (

View File

@ -300,7 +300,10 @@ impl ModuleCodeGenerator<X64FunctionCode, X64ExecutionContext, CodegenError>
Ok(()) Ok(())
} }
fn next_function(&mut self) -> Result<&mut X64FunctionCode, CodegenError> { fn next_function(
&mut self,
_module_info: &ModuleInfo,
) -> Result<&mut X64FunctionCode, CodegenError> {
let (mut assembler, mut function_labels, br_table_data, breakpoints) = let (mut assembler, mut function_labels, br_table_data, breakpoints) =
match self.functions.last_mut() { match self.functions.last_mut() {
Some(x) => ( Some(x) => (