mirror of
https://github.com/rust-lang/rust.git
synced 2025-05-01 20:47:36 +00:00
30 lines
1.1 KiB
Rust
30 lines
1.1 KiB
Rust
![]() |
#![allow(non_camel_case_types)]
|
||
|
|
||
|
use libc::{c_char, c_uint};
|
||
|
|
||
|
use super::ffi::{BasicBlock, Metadata, Module, Type, Value};
|
||
|
use crate::llvm::Bool;
|
||
|
extern "C" {
|
||
|
// Enzyme
|
||
|
pub fn LLVMRustHasMetadata(I: &Value, KindID: c_uint) -> bool;
|
||
|
pub fn LLVMRustEraseInstBefore(BB: &BasicBlock, I: &Value);
|
||
|
pub fn LLVMRustGetLastInstruction<'a>(BB: &BasicBlock) -> Option<&'a Value>;
|
||
|
pub fn LLVMRustDIGetInstMetadata(I: &Value) -> Option<&Metadata>;
|
||
|
pub fn LLVMRustEraseInstFromParent(V: &Value);
|
||
|
pub fn LLVMRustGetTerminator<'a>(B: &BasicBlock) -> &'a Value;
|
||
|
pub fn LLVMRustVerifyFunction(V: &Value, action: LLVMRustVerifierFailureAction) -> Bool;
|
||
|
|
||
|
pub fn LLVMGetFunctionCallConv(F: &Value) -> c_uint;
|
||
|
pub fn LLVMGetReturnType(T: &Type) -> &Type;
|
||
|
pub fn LLVMGetParams(Fnc: &Value, parms: *mut &Value);
|
||
|
pub fn LLVMGetNamedFunction(M: &Module, Name: *const c_char) -> Option<&Value>;
|
||
|
}
|
||
|
|
||
|
#[repr(C)]
|
||
|
#[derive(Copy, Clone, PartialEq)]
|
||
|
pub enum LLVMRustVerifierFailureAction {
|
||
|
LLVMAbortProcessAction = 0,
|
||
|
LLVMPrintMessageAction = 1,
|
||
|
LLVMReturnStatusAction = 2,
|
||
|
}
|