Skip to content

Commit

Permalink
wip errorhandler, broken
Browse files Browse the repository at this point in the history
  • Loading branch information
ZuseZ4 committed Aug 9, 2024
1 parent a55f6f1 commit 3736666
Show file tree
Hide file tree
Showing 2 changed files with 518 additions and 0 deletions.
18 changes: 18 additions & 0 deletions compiler/rustc_codegen_llvm/src/llvm/ffi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ pub type Bool = c_uint;
pub const True: Bool = 1 as Bool;
pub const False: Bool = 0 as Bool;


#[derive(Copy, Clone, PartialEq)]
#[repr(C)]
#[allow(dead_code)] // Variants constructed by C++.
Expand Down Expand Up @@ -111,6 +112,23 @@ pub enum CallConv {
AmdGpuKernel = 91,
}

/// LLVMRustErrorType
#[derive(Copy, Clone, PartialEq)]
#[repr(C)]
pub enum ErrorType {
NoDerivative = 0,
NoShadow = 1,
IllegalTypeAnalysis = 2,
NoType = 3,
IllegalFirstPointer = 4,
InternalError = 5,
TypeDepthExceeded = 6,
MixedActivityError = 7,
IllegalReplaceFicticiousPHIs = 8,
GetIndexError = 9,
NoTruncate = 10,
}

/// LLVMRustLinkage
#[derive(Copy, Clone, PartialEq)]
#[repr(C)]
Expand Down
Loading

0 comments on commit 3736666

Please sign in to comment.