Make some "safe" llvm ops actually sound

This commit is contained in:
Oli Scherer
2025-07-10 07:27:41 +00:00
parent 6b3ae3f6e4
commit 84eeca2e2f
4 changed files with 9 additions and 7 deletions

View File

@@ -306,7 +306,7 @@ fn generate_enzyme_call<'ll>(
// add outer_fn name to ad_name to make it unique, in case users apply autodiff to multiple
// functions. Unwrap will only panic, if LLVM gave us an invalid string.
let name = llvm::get_value_name(outer_fn);
let outer_fn_name = std::str::from_utf8(name).unwrap();
let outer_fn_name = std::str::from_utf8(&name).unwrap();
ad_name.push_str(outer_fn_name);
// Let us assume the user wrote the following function square: