From 5e4637b61facfb607c02026e5d605e6bb6fe1a60 Mon Sep 17 00:00:00 2001 From: Brian Anderson Date: Wed, 7 Sep 2011 11:58:49 -0700 Subject: Add Rust definitions for new LLVM EH instructions Issue #236 --- src/comp/lib/llvm.rs | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/comp/lib') 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; -- cgit 1.4.1-3-g733a5