diff options
| author | Oli Scherer <github333195615777966@oli-obk.de> | 2025-07-10 07:27:41 +0000 |
|---|---|---|
| committer | Oli Scherer <github333195615777966@oli-obk.de> | 2025-07-10 07:27:41 +0000 |
| commit | 84eeca2e2fc40bb8d6641846f18af9d8fc6a9681 (patch) | |
| tree | ab835839158c7b975334559153b12c8709ca7df6 /compiler/rustc_codegen_llvm/src/builder/autodiff.rs | |
| parent | 6b3ae3f6e45a33c2d95fa0362c9b2593e567fd34 (diff) | |
| download | rust-84eeca2e2fc40bb8d6641846f18af9d8fc6a9681.tar.gz rust-84eeca2e2fc40bb8d6641846f18af9d8fc6a9681.zip | |
Make some "safe" llvm ops actually sound
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/builder/autodiff.rs')
| -rw-r--r-- | compiler/rustc_codegen_llvm/src/builder/autodiff.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_codegen_llvm/src/builder/autodiff.rs b/compiler/rustc_codegen_llvm/src/builder/autodiff.rs index b07d9a5cfca..5afb9a60d42 100644 --- a/compiler/rustc_codegen_llvm/src/builder/autodiff.rs +++ b/compiler/rustc_codegen_llvm/src/builder/autodiff.rs @@ -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: |
