about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src/back
diff options
context:
space:
mode:
authorbjorn3 <17426603+bjorn3@users.noreply.github.com>2025-07-03 14:43:09 +0000
committerbjorn3 <17426603+bjorn3@users.noreply.github.com>2025-07-03 14:43:09 +0000
commit7fd78df3463c761a693ea79265a6a1faaf2ed51b (patch)
treec7199abe7071c6418ec0db3514841239c9a40ef9 /compiler/rustc_codegen_llvm/src/back
parent653bb64c7530c86d00b875e1ef14ac75455d2d80 (diff)
downloadrust-7fd78df3463c761a693ea79265a6a1faaf2ed51b.tar.gz
rust-7fd78df3463c761a693ea79265a6a1faaf2ed51b.zip
Move dcx creation into WriteBackendMethods::codegen
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/back')
-rw-r--r--compiler/rustc_codegen_llvm/src/back/write.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/compiler/rustc_codegen_llvm/src/back/write.rs b/compiler/rustc_codegen_llvm/src/back/write.rs
index bde6a9cf4bc..1f7a785bbe7 100644
--- a/compiler/rustc_codegen_llvm/src/back/write.rs
+++ b/compiler/rustc_codegen_llvm/src/back/write.rs
@@ -817,10 +817,12 @@ pub(crate) fn link(
 
 pub(crate) fn codegen(
     cgcx: &CodegenContext<LlvmCodegenBackend>,
-    dcx: DiagCtxtHandle<'_>,
     module: ModuleCodegen<ModuleLlvm>,
     config: &ModuleConfig,
 ) -> Result<CompiledModule, FatalError> {
+    let dcx = cgcx.create_dcx();
+    let dcx = dcx.handle();
+
     let _timer = cgcx.prof.generic_activity_with_arg("LLVM_module_codegen", &*module.name);
     {
         let llmod = module.module_llvm.llmod();