Skip to content

Commit a7c78bc

Browse files
committed
fix Fallback_AD types
1 parent 1d7b872 commit a7c78bc

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

compiler/rustc_codegen_llvm/src/llvm/enzyme_ffi.rs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -466,7 +466,7 @@ pub(crate) mod Fallback_AD {
466466
#![allow(unused_variables)]
467467

468468
use std::ffi::c_void;
469-
use std::sync::Mutex;
469+
use std::sync::{Mutex, MutexGuard};
470470

471471
use libc::c_char;
472472
use rustc_codegen_ssa::back::write::CodegenContext;
@@ -479,13 +479,19 @@ pub(crate) mod Fallback_AD {
479479
}
480480

481481
impl EnzymeWrapper {
482+
pub(crate) fn get_or_init(
483+
_sysroot: &rustc_session::config::Sysroot,
484+
) -> MutexGuard<'static, Self> {
485+
unimplemented!("Enzyme not available: build with llvm_enzyme feature")
486+
}
487+
482488
pub(crate) fn init<'a, B: WriteBackendMethods>(
483489
_cgcx: &'a CodegenContext<B>,
484490
) -> &'static Mutex<Self> {
485491
unimplemented!("Enzyme not available: build with llvm_enzyme feature")
486492
}
487493

488-
pub(crate) fn get_instance() -> &'static Mutex<Self> {
494+
pub(crate) fn get_instance() -> MutexGuard<'static, Self> {
489495
unimplemented!("Enzyme not available: build with llvm_enzyme feature")
490496
}
491497

0 commit comments

Comments
 (0)