diff options
| author | Ralf Jung <post@ralfj.de> | 2025-02-02 16:13:07 +0100 |
|---|---|---|
| committer | Ralf Jung <post@ralfj.de> | 2025-02-02 16:13:07 +0100 |
| commit | f034a1544193a91fc03ced4a047fe8a3fa857b81 (patch) | |
| tree | b29ab119ebbd418e0a932c83dfe488f0b3ce9f35 /compiler/rustc_codegen_llvm/src | |
| parent | bf69458973ae5fc249ec06406669f4e1f547d3d0 (diff) | |
| parent | 6dd75f0d6802f56564f5f9c947a85ded286d3986 (diff) | |
| download | rust-f034a1544193a91fc03ced4a047fe8a3fa857b81.tar.gz rust-f034a1544193a91fc03ced4a047fe8a3fa857b81.zip | |
Merge from rustc
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); |
