diff options
| author | bors <bors@rust-lang.org> | 2025-02-01 20:07:58 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2025-02-01 20:07:58 +0000 |
| commit | 8239a37f9c0951a037cfc51763ea52a20e71e6bd (patch) | |
| tree | 869cab603a15f4c6b1de22ec2ee905a12af7dc5b /compiler/rustc_codegen_llvm/src | |
| parent | e08cd3cf05e5bfa3323cc21ea8f81f4a15a2f969 (diff) | |
| parent | 2a82ebdcb7512b818da18eb04d1d11f623d6e38c (diff) | |
| download | rust-8239a37f9c0951a037cfc51763ea52a20e71e6bd.tar.gz rust-8239a37f9c0951a037cfc51763ea52a20e71e6bd.zip | |
Auto merge of #136389 - matthiaskrgr:rollup-x453dy9, r=matthiaskrgr
Rollup of 6 pull requests Successful merges: - #130514 (Implement MIR lowering for unsafe binders) - #135684 (docs: Documented Send and Sync requirements for Mutex + MutexGuard) - #136307 (Implement all mix/max functions in a (hopefully) more optimization amendable way) - #136360 (Stabilize `once_wait`) - #136364 (document that ptr cmp is unsigned) - #136374 (Add link attribute for Enzyme's LLVMRust FFI) r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
| -rw-r--r-- | compiler/rustc_codegen_llvm/src/llvm/enzyme_ffi.rs | 9 |
1 files changed, 7 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 ae813fe5ebf..92b0ce8ffe1 100644 --- a/compiler/rustc_codegen_llvm/src/llvm/enzyme_ffi.rs +++ b/compiler/rustc_codegen_llvm/src/llvm/enzyme_ffi.rs @@ -4,6 +4,8 @@ use libc::{c_char, c_uint}; use super::ffi::{BasicBlock, Metadata, Module, Type, Value}; use crate::llvm::Bool; + +#[link(name = "llvm-wrapper", kind = "static")] extern "C" { // Enzyme pub fn LLVMRustHasMetadata(I: &Value, KindID: c_uint) -> bool; @@ -12,10 +14,13 @@ extern "C" { pub fn LLVMRustDIGetInstMetadata(I: &Value) -> Option<&Metadata>; pub fn LLVMRustEraseInstFromParent(V: &Value); pub fn LLVMRustGetTerminator<'a>(B: &BasicBlock) -> &'a Value; - pub fn LLVMDumpModule(M: &Module); - pub fn LLVMDumpValue(V: &Value); pub fn LLVMRustVerifyFunction(V: &Value, action: LLVMRustVerifierFailureAction) -> Bool; +} +extern "C" { + // Enzyme + pub fn LLVMDumpModule(M: &Module); + pub fn LLVMDumpValue(V: &Value); pub fn LLVMGetFunctionCallConv(F: &Value) -> c_uint; pub fn LLVMGetReturnType(T: &Type) -> &Type; pub fn LLVMGetParams(Fnc: &Value, parms: *mut &Value); |
