Skip to content

Commit 3a80067

Browse files
committed
simplify a self-profiling activity call in the LLVM backend
and so that it doesn't allocate unless event argument recording is turned on
1 parent 7585269 commit 3a80067

File tree

1 file changed

+1
-2
lines changed
  • compiler/rustc_codegen_llvm/src/back

1 file changed

+1
-2
lines changed

compiler/rustc_codegen_llvm/src/back/write.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -721,8 +721,7 @@ pub(crate) fn link(
721721

722722
let mut linker = Linker::new(first.module_llvm.llmod());
723723
for module in elements {
724-
let _timer =
725-
cgcx.prof.generic_activity_with_arg("LLVM_link_module", format!("{:?}", module.name));
724+
let _timer = cgcx.prof.generic_activity_with_arg("LLVM_link_module", &*module.name);
726725
let buffer = ModuleBuffer::new(module.module_llvm.llmod());
727726
linker.add(buffer.data()).map_err(|()| {
728727
let msg = format!("failed to serialize module {:?}", module.name);

0 commit comments

Comments
 (0)