From e34e625009e79e25883ab086b4e8fa0a41ca13ef Mon Sep 17 00:00:00 2001 From: Brandon Fish Date: Sun, 19 May 2019 11:45:16 -0500 Subject: [PATCH] Implement MCG.next_function in other backends --- lib/llvm-backend/src/code.rs | 5 ++++- lib/singlepass-backend/src/codegen_x64.rs | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/lib/llvm-backend/src/code.rs b/lib/llvm-backend/src/code.rs index 028207a8c..932ebfc1c 100644 --- a/lib/llvm-backend/src/code.rs +++ b/lib/llvm-backend/src/code.rs @@ -2473,7 +2473,10 @@ impl ModuleCodeGenerator 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. let (context, builder, intrinsics) = match self.functions.last_mut() { Some(x) => ( diff --git a/lib/singlepass-backend/src/codegen_x64.rs b/lib/singlepass-backend/src/codegen_x64.rs index 9aa6c9151..9cb163372 100644 --- a/lib/singlepass-backend/src/codegen_x64.rs +++ b/lib/singlepass-backend/src/codegen_x64.rs @@ -300,7 +300,10 @@ impl ModuleCodeGenerator 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) = match self.functions.last_mut() { Some(x) => (