Rollup merge of #140030 - EnzymeAD:autodiff-debug, r=jieyouxu

Fix autodiff debug builds

r? `@oli-obk`

closes: #139704

Tracking:

- https://github.com/rust-lang/rust/issues/124509
This commit is contained in:
Chris Denton 2025-04-21 15:55:59 +00:00 committed by GitHub
commit c43b82f576
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -254,8 +254,9 @@ where
always_export_generics,
);
// We can't differentiate something that got inlined.
// We can't differentiate a function that got inlined.
let autodiff_active = cfg!(llvm_enzyme)
&& matches!(mono_item, MonoItem::Fn(_))
&& cx
.tcx
.codegen_fn_attrs(mono_item.def_id())