diff options
| author | Rémy Rakic <remy.rakic+github@gmail.com> | 2022-04-01 21:01:47 +0200 |
|---|---|---|
| committer | Rémy Rakic <remy.rakic+github@gmail.com> | 2022-04-07 15:47:20 +0200 |
| commit | 3a8006714be2524b650f046f028836578ddc7e51 (patch) | |
| tree | 6423b27be4cc11d4084c4070316db380c4e797df /compiler/rustc_codegen_llvm/src | |
| parent | 75852696735110cb41903e0699a4fc0e8617fce8 (diff) | |
| download | rust-3a8006714be2524b650f046f028836578ddc7e51.tar.gz rust-3a8006714be2524b650f046f028836578ddc7e51.zip | |
simplify a self-profiling activity call in the LLVM backend
and so that it doesn't allocate unless event argument recording is turned on
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
| -rw-r--r-- | compiler/rustc_codegen_llvm/src/back/write.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/compiler/rustc_codegen_llvm/src/back/write.rs b/compiler/rustc_codegen_llvm/src/back/write.rs index c18719d4ad7..7ef3b12cd08 100644 --- a/compiler/rustc_codegen_llvm/src/back/write.rs +++ b/compiler/rustc_codegen_llvm/src/back/write.rs @@ -721,8 +721,7 @@ pub(crate) fn link( let mut linker = Linker::new(first.module_llvm.llmod()); for module in elements { - let _timer = - cgcx.prof.generic_activity_with_arg("LLVM_link_module", format!("{:?}", module.name)); + let _timer = cgcx.prof.generic_activity_with_arg("LLVM_link_module", &*module.name); let buffer = ModuleBuffer::new(module.module_llvm.llmod()); linker.add(buffer.data()).map_err(|()| { let msg = format!("failed to serialize module {:?}", module.name); |
