about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src/llvm/enzyme_ffi.rs
diff options
context:
space:
mode:
authorMichael Goulet <michael@errs.io>2025-02-20 18:28:42 +0000
committerMichael Goulet <michael@errs.io>2025-02-22 00:01:48 +0000
commite1819a889a2606b79dc9cc790205da1497d617b7 (patch)
tree9593f04e792f244d00ee52e493ba14208627ca50 /compiler/rustc_codegen_llvm/src/llvm/enzyme_ffi.rs
parent7f6873f64c17cfa53a10a7751c7213f6ed0215c1 (diff)
downloadrust-e1819a889a2606b79dc9cc790205da1497d617b7.tar.gz
rust-e1819a889a2606b79dc9cc790205da1497d617b7.zip
Fix overcapturing, unsafe extern blocks, and new unsafe ops
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/llvm/enzyme_ffi.rs')
-rw-r--r--compiler/rustc_codegen_llvm/src/llvm/enzyme_ffi.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_codegen_llvm/src/llvm/enzyme_ffi.rs b/compiler/rustc_codegen_llvm/src/llvm/enzyme_ffi.rs
index 39bac13a968..9c740ab9868 100644
--- a/compiler/rustc_codegen_llvm/src/llvm/enzyme_ffi.rs
+++ b/compiler/rustc_codegen_llvm/src/llvm/enzyme_ffi.rs
@@ -7,7 +7,7 @@ use super::ffi::{BasicBlock, Metadata, Module, Type, Value};
 use crate::llvm::Bool;
 
 #[link(name = "llvm-wrapper", kind = "static")]
-extern "C" {
+unsafe extern "C" {
     // Enzyme
     pub(crate) fn LLVMRustHasMetadata(I: &Value, KindID: c_uint) -> bool;
     pub(crate) fn LLVMRustEraseInstUntilInclusive(BB: &BasicBlock, I: &Value);
@@ -18,7 +18,7 @@ extern "C" {
     pub(crate) fn LLVMRustVerifyFunction(V: &Value, action: LLVMRustVerifierFailureAction) -> Bool;
 }
 
-extern "C" {
+unsafe extern "C" {
     // Enzyme
     pub(crate) fn LLVMDumpModule(M: &Module);
     pub(crate) fn LLVMDumpValue(V: &Value);