diff options
| author | bjorn3 <17426603+bjorn3@users.noreply.github.com> | 2022-08-17 13:07:18 +0000 |
|---|---|---|
| committer | bjorn3 <17426603+bjorn3@users.noreply.github.com> | 2022-08-17 13:07:18 +0000 |
| commit | b181f2b3769f1185d328efb1569c3da72e5edaa0 (patch) | |
| tree | 0867fa53fd02813f208fcd1060c155d062043422 | |
| parent | 701b2747c331fb311ab67e50519bb226d86b76dc (diff) | |
| download | rust-b181f2b3769f1185d328efb1569c3da72e5edaa0.tar.gz rust-b181f2b3769f1185d328efb1569c3da72e5edaa0.zip | |
Replace instance param of write_clif_file with symbol_name
| -rw-r--r-- | src/base.rs | 6 | ||||
| -rw-r--r-- | src/pretty_clif.rs | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/base.rs b/src/base.rs index 2603da19182..85cdc6824a6 100644 --- a/src/base.rs +++ b/src/base.rs @@ -119,9 +119,9 @@ fn codegen_fn<'tcx>( crate::pretty_clif::write_clif_file( tcx, + symbol_name.name, "unopt", module.isa(), - instance, &func, &clif_comments, ); @@ -201,9 +201,9 @@ fn compile_fn<'tcx>( // Write optimized function to file for debugging crate::pretty_clif::write_clif_file( tcx, + codegened_func.symbol_name.name, "opt", module.isa(), - codegened_func.instance, &context.func, &clif_comments, ); @@ -211,7 +211,7 @@ fn compile_fn<'tcx>( if let Some(disasm) = &context.mach_compile_result.as_ref().unwrap().disasm { crate::pretty_clif::write_ir_file( tcx, - || format!("{}.vcode", tcx.symbol_name(codegened_func.instance).name), + || format!("{}.vcode", codegened_func.symbol_name.name), |file| file.write_all(disasm.as_bytes()), ) } diff --git a/src/pretty_clif.rs b/src/pretty_clif.rs index 1d1ec21680e..0081ec842eb 100644 --- a/src/pretty_clif.rs +++ b/src/pretty_clif.rs @@ -231,16 +231,16 @@ pub(crate) fn write_ir_file( pub(crate) fn write_clif_file<'tcx>( tcx: TyCtxt<'tcx>, + symbol_name: &str, postfix: &str, isa: &dyn cranelift_codegen::isa::TargetIsa, - instance: Instance<'tcx>, func: &cranelift_codegen::ir::Function, mut clif_comments: &CommentWriter, ) { // FIXME work around filename too long errors write_ir_file( tcx, - || format!("{}.{}.clif", tcx.symbol_name(instance).name, postfix), + || format!("{}.{}.clif", symbol_name, postfix), |file| { let mut clif = String::new(); cranelift_codegen::write::decorate_function(&mut clif_comments, &mut clif, func) |
