llvm_sys/
error.rs

1pub const LLVMErrorSuccess: ::libc::c_int = 0;
2
3#[derive(Debug)]
4pub enum LLVMOpaqueError {}
5
6pub type LLVMErrorRef = *mut LLVMOpaqueError;
7
8pub type LLVMErrorTypeId = *const ::libc::c_void;
9
10extern "C" {
11    pub fn LLVMGetErrorTypeId(Err: LLVMErrorRef) -> LLVMErrorTypeId;
12    pub fn LLVMConsumeError(Err: LLVMErrorRef);
13    ///  Report a fatal error if Err is a failure value.
14    ///
15    /// This function can be used to wrap calls to fallible functions ONLY when it is
16    /// known that the Error will always be a success value.
17    pub fn LLVMCantFail(Err: LLVMErrorRef);
18    pub fn LLVMGetErrorMessage(Err: LLVMErrorRef) -> *mut ::libc::c_char;
19    pub fn LLVMDisposeErrorMessage(ErrMsg: *mut ::libc::c_char);
20    pub fn LLVMGetStringErrorTypeId() -> LLVMErrorTypeId;
21    /// Create a StringError.
22    pub fn LLVMCreateStringError(ErrMst: *const ::libc::c_char) -> LLVMErrorRef;
23}