Add Rust definitions for new LLVM EH instructions

Issue #236
This commit is contained in:
Brian Anderson 2011-09-07 11:58:49 -07:00
parent 4bced5e5f2
commit 5e4637b61f
3 changed files with 29 additions and 0 deletions

View file

@ -545,6 +545,22 @@ fn Trap(cx: &@block_ctxt) -> ValueRef {
});
}
fn LandingPad(cx: &@block_ctxt, Ty: TypeRef, PersFn: ValueRef,
NumClauses: uint) -> ValueRef {
ret str::as_buf("",
{|buf|
llvm::LLVMBuildLandingPad(B(cx),
Ty,
PersFn,
NumClauses,
buf)
});
}
fn SetCleanup(_cx: &@block_ctxt, LandingPad: ValueRef) {
llvm::LLVMSetCleanup(LandingPad, lib::llvm::True);
}
//
// Local Variables:
// mode: rust