Remove sink arguments from compile_and_emit
The data can be accessed after the fact using context.mach_compile_result
This commit is contained in:
@@ -1,9 +1,6 @@
|
||||
use cranelift_codegen::ir::*;
|
||||
use cranelift_codegen::isa::CallConv;
|
||||
use cranelift_codegen::{
|
||||
binemit::{NullStackMapSink, NullTrapSink},
|
||||
settings,
|
||||
};
|
||||
use cranelift_codegen::settings;
|
||||
use cranelift_codegen::{ir::types::I16, Context};
|
||||
use cranelift_entity::EntityRef;
|
||||
use cranelift_frontend::*;
|
||||
@@ -53,11 +50,7 @@ fn define_simple_function(module: &mut ObjectModule) -> FuncId {
|
||||
bcx.ins().return_(&[]);
|
||||
}
|
||||
|
||||
let mut trap_sink = NullTrapSink {};
|
||||
let mut stack_map_sink = NullStackMapSink {};
|
||||
module
|
||||
.define_function(func_id, &mut ctx, &mut trap_sink, &mut stack_map_sink)
|
||||
.unwrap();
|
||||
module.define_function(func_id, &mut ctx).unwrap();
|
||||
|
||||
func_id
|
||||
}
|
||||
@@ -194,11 +187,7 @@ fn libcall_function() {
|
||||
bcx.ins().return_(&[]);
|
||||
}
|
||||
|
||||
let mut trap_sink = NullTrapSink {};
|
||||
let mut stack_map_sink = NullStackMapSink {};
|
||||
module
|
||||
.define_function(func_id, &mut ctx, &mut trap_sink, &mut stack_map_sink)
|
||||
.unwrap();
|
||||
module.define_function(func_id, &mut ctx).unwrap();
|
||||
|
||||
module.finish();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user