1
Fork 0

Avoid some duplication between SimpleCx and CodegenCx

This commit is contained in:
Oli Scherer 2025-02-24 08:15:31 +00:00
parent d4379d2afd
commit bfd88cead0
4 changed files with 96 additions and 90 deletions

View file

@ -286,7 +286,7 @@ pub(crate) fn differentiate<'ll>(
}
let diag_handler = cgcx.create_dcx();
let cx = SimpleCx { llmod: module.module_llvm.llmod(), llcx: module.module_llvm.llcx };
let cx = SimpleCx::new(module.module_llvm.llmod(), module.module_llvm.llcx);
// First of all, did the user try to use autodiff without using the -Zautodiff=Enable flag?
if !diff_items.is_empty()