diff options
| author | bjorn3 <17426603+bjorn3@users.noreply.github.com> | 2022-09-01 13:53:47 +0200 |
|---|---|---|
| committer | bjorn3 <17426603+bjorn3@users.noreply.github.com> | 2022-09-01 13:53:47 +0200 |
| commit | 2bcc936a5aeea322cec6d1f04d5323d11e033723 (patch) | |
| tree | 8360cbf18c2f2f4bdfa824abc69a7d610303807e | |
| parent | 096611855c90561188cb73d0e4a656e27a710d91 (diff) | |
| download | rust-2bcc936a5aeea322cec6d1f04d5323d11e033723.tar.gz rust-2bcc936a5aeea322cec6d1f04d5323d11e033723.zip | |
Remove all uses of Function::with_name_signature
The current main branch of Cranelift changed it's signature. Removing it's use is the easiest way to deal with this.
| -rw-r--r-- | src/allocator.rs | 4 | ||||
| -rw-r--r-- | src/main_shim.rs | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/allocator.rs b/src/allocator.rs index 6d321c7b298..bad8a87b9be 100644 --- a/src/allocator.rs +++ b/src/allocator.rs @@ -78,7 +78,7 @@ fn codegen_inner( let callee_func_id = module.declare_function(&callee_name, Linkage::Import, &sig).unwrap(); let mut ctx = Context::new(); - ctx.func = Function::with_name_signature(ExternalName::user(0, 0), sig.clone()); + ctx.func.signature = sig.clone(); { let mut func_ctx = FunctionBuilderContext::new(); let mut bcx = FunctionBuilder::new(&mut ctx.func, &mut func_ctx); @@ -116,7 +116,7 @@ fn codegen_inner( let callee_func_id = module.declare_function(callee_name, Linkage::Import, &sig).unwrap(); let mut ctx = Context::new(); - ctx.func = Function::with_name_signature(ExternalName::user(0, 0), sig); + ctx.func.signature = sig; { let mut func_ctx = FunctionBuilderContext::new(); let mut bcx = FunctionBuilder::new(&mut ctx.func, &mut func_ctx); diff --git a/src/main_shim.rs b/src/main_shim.rs index c67b6e98b32..b5a17ee153d 100644 --- a/src/main_shim.rs +++ b/src/main_shim.rs @@ -74,7 +74,7 @@ pub(crate) fn maybe_create_entry_wrapper( let main_func_id = m.declare_function(main_name, Linkage::Import, &main_sig).unwrap(); let mut ctx = Context::new(); - ctx.func = Function::with_name_signature(ExternalName::user(0, 0), cmain_sig); + ctx.func.signature = cmain_sig; { let mut func_ctx = FunctionBuilderContext::new(); let mut bcx = FunctionBuilder::new(&mut ctx.func, &mut func_ctx); |
