Skip to content

Commit b181f2b

Browse files
committed
Replace instance param of write_clif_file with symbol_name
1 parent 701b274 commit b181f2b

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/base.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,9 +119,9 @@ fn codegen_fn<'tcx>(
119119

120120
crate::pretty_clif::write_clif_file(
121121
tcx,
122+
symbol_name.name,
122123
"unopt",
123124
module.isa(),
124-
instance,
125125
&func,
126126
&clif_comments,
127127
);
@@ -201,17 +201,17 @@ fn compile_fn<'tcx>(
201201
// Write optimized function to file for debugging
202202
crate::pretty_clif::write_clif_file(
203203
tcx,
204+
codegened_func.symbol_name.name,
204205
"opt",
205206
module.isa(),
206-
codegened_func.instance,
207207
&context.func,
208208
&clif_comments,
209209
);
210210

211211
if let Some(disasm) = &context.mach_compile_result.as_ref().unwrap().disasm {
212212
crate::pretty_clif::write_ir_file(
213213
tcx,
214-
|| format!("{}.vcode", tcx.symbol_name(codegened_func.instance).name),
214+
|| format!("{}.vcode", codegened_func.symbol_name.name),
215215
|file| file.write_all(disasm.as_bytes()),
216216
)
217217
}

src/pretty_clif.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -231,16 +231,16 @@ pub(crate) fn write_ir_file(
231231

232232
pub(crate) fn write_clif_file<'tcx>(
233233
tcx: TyCtxt<'tcx>,
234+
symbol_name: &str,
234235
postfix: &str,
235236
isa: &dyn cranelift_codegen::isa::TargetIsa,
236-
instance: Instance<'tcx>,
237237
func: &cranelift_codegen::ir::Function,
238238
mut clif_comments: &CommentWriter,
239239
) {
240240
// FIXME work around filename too long errors
241241
write_ir_file(
242242
tcx,
243-
|| format!("{}.{}.clif", tcx.symbol_name(instance).name, postfix),
243+
|| format!("{}.{}.clif", symbol_name, postfix),
244244
|file| {
245245
let mut clif = String::new();
246246
cranelift_codegen::write::decorate_function(&mut clif_comments, &mut clif, func)

0 commit comments

Comments
 (0)