about summary refs log tree commit diff
path: root/compiler/rustc_codegen_ssa/src/lib.rs
diff options
context:
space:
mode:
authorMichael Goulet <michael@errs.io>2025-04-06 23:37:30 +0000
committerMichael Goulet <michael@errs.io>2025-04-07 20:48:40 +0000
commiteffef88ac70f2d12229b77b8e428037df8028b7e (patch)
treed120831677ff170df3a2a3538693a070a0bc83d2 /compiler/rustc_codegen_ssa/src/lib.rs
parente643f59f6da3a84f43e75dea99afaa5b041ea6bf (diff)
downloadrust-effef88ac70f2d12229b77b8e428037df8028b7e.tar.gz
rust-effef88ac70f2d12229b77b8e428037df8028b7e.zip
Simplify temp path creation a bit
Diffstat (limited to 'compiler/rustc_codegen_ssa/src/lib.rs')
-rw-r--r--compiler/rustc_codegen_ssa/src/lib.rs11
1 files changed, 6 insertions, 5 deletions
diff --git a/compiler/rustc_codegen_ssa/src/lib.rs b/compiler/rustc_codegen_ssa/src/lib.rs
index 67217927a87..491fe4a57a4 100644
--- a/compiler/rustc_codegen_ssa/src/lib.rs
+++ b/compiler/rustc_codegen_ssa/src/lib.rs
@@ -106,12 +106,13 @@ impl<M> ModuleCodegen<M> {
         emit_ir: bool,
         outputs: &OutputFilenames,
     ) -> CompiledModule {
-        let object = emit_obj.then(|| outputs.temp_path(OutputType::Object, Some(&self.name)));
-        let dwarf_object = emit_dwarf_obj.then(|| outputs.temp_path_dwo(Some(&self.name)));
-        let bytecode = emit_bc.then(|| outputs.temp_path(OutputType::Bitcode, Some(&self.name)));
-        let assembly = emit_asm.then(|| outputs.temp_path(OutputType::Assembly, Some(&self.name)));
+        let object = emit_obj.then(|| outputs.temp_path_for_cgu(OutputType::Object, &self.name));
+        let dwarf_object = emit_dwarf_obj.then(|| outputs.temp_path_dwo_for_cgu(&self.name));
+        let bytecode = emit_bc.then(|| outputs.temp_path_for_cgu(OutputType::Bitcode, &self.name));
+        let assembly =
+            emit_asm.then(|| outputs.temp_path_for_cgu(OutputType::Assembly, &self.name));
         let llvm_ir =
-            emit_ir.then(|| outputs.temp_path(OutputType::LlvmAssembly, Some(&self.name)));
+            emit_ir.then(|| outputs.temp_path_for_cgu(OutputType::LlvmAssembly, &self.name));
 
         CompiledModule {
             name: self.name.clone(),