diff options
| author | Brian Anderson <banderson@mozilla.com> | 2011-09-07 11:58:49 -0700 |
|---|---|---|
| committer | Brian Anderson <banderson@mozilla.com> | 2011-09-11 17:31:38 -0700 |
| commit | 5e4637b61facfb607c02026e5d605e6bb6fe1a60 (patch) | |
| tree | 90084b079a37aed679eea0e2c5bf0fc8e41ad60b /src/comp/lib | |
| parent | 4bced5e5f2fcf7e1c7725e747ac3110ef0a9c1e4 (diff) | |
| download | rust-5e4637b61facfb607c02026e5d605e6bb6fe1a60.tar.gz rust-5e4637b61facfb607c02026e5d605e6bb6fe1a60.zip | |
Add Rust definitions for new LLVM EH instructions
Issue #236
Diffstat (limited to 'src/comp/lib')
| -rw-r--r-- | src/comp/lib/llvm.rs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/comp/lib/llvm.rs b/src/comp/lib/llvm.rs index 431893b0201..198b629e251 100644 --- a/src/comp/lib/llvm.rs +++ b/src/comp/lib/llvm.rs @@ -572,6 +572,9 @@ native "cdecl" mod llvm = "rustllvm" { fn LLVMBuildInvoke(B: BuilderRef, Fn: ValueRef, Args: *ValueRef, NumArgs: uint, Then: BasicBlockRef, Catch: BasicBlockRef, Name: sbuf) -> ValueRef; + fn LLVMBuildLandingPad(B: BuilderRef, Ty: TypeRef, PersFn: ValueRef, + NumClauses: uint, Name: sbuf) -> ValueRef; + fn LLVMBuildResume(B: BuilderRef, Exn: ValueRef) -> ValueRef; fn LLVMBuildUnreachable(B: BuilderRef) -> ValueRef; /* Add a case to the switch instruction */ @@ -580,6 +583,12 @@ native "cdecl" mod llvm = "rustllvm" { /* Add a destination to the indirectbr instruction */ fn LLVMAddDestination(IndirectBr: ValueRef, Dest: BasicBlockRef); + /* Add a clause to the landing pad instruction */ + fn LLVMAddClause(LandingPad: ValueRef, ClauseVal: ValueRef); + + /* Set the cleanup on a landing pad instruction */ + fn LLVMSetCleanup(LandingPad: ValueRef, Val: Bool); + /* Arithmetic */ fn LLVMBuildAdd(B: BuilderRef, LHS: ValueRef, RHS: ValueRef, Name: sbuf) -> ValueRef; |
