Remove outdated LLVMRustBuildLandingPad() wrapper

The function was added as a wrapper to handle compatibility with older
LLVM versions that we no longer support, so it can be removed.

Refs #46437
This commit is contained in:
Björn Steinbrink 2017-12-08 10:53:46 +01:00
parent 0f4ebf9f0a
commit d7bbd3042c
5 changed files with 11 additions and 20 deletions

View File

@ -812,13 +812,12 @@ extern "C" {
Bundle: OperandBundleDefRef,
Name: *const c_char)
-> ValueRef;
pub fn LLVMRustBuildLandingPad(B: BuilderRef,
Ty: TypeRef,
PersFn: ValueRef,
NumClauses: c_uint,
Name: *const c_char,
F: ValueRef)
-> ValueRef;
pub fn LLVMBuildLandingPad(B: BuilderRef,
Ty: TypeRef,
PersFn: ValueRef,
NumClauses: c_uint,
Name: *const c_char)
-> ValueRef;
pub fn LLVMBuildResume(B: BuilderRef, Exn: ValueRef) -> ValueRef;
pub fn LLVMBuildUnreachable(B: BuilderRef) -> ValueRef;

View File

@ -1012,12 +1012,11 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
}
pub fn landing_pad(&self, ty: Type, pers_fn: ValueRef,
num_clauses: usize,
llfn: ValueRef) -> ValueRef {
num_clauses: usize) -> ValueRef {
self.count_insn("landingpad");
unsafe {
llvm::LLVMRustBuildLandingPad(self.llbuilder, ty.to_ref(), pers_fn,
num_clauses as c_uint, noname(), llfn)
llvm::LLVMBuildLandingPad(self.llbuilder, ty.to_ref(), pers_fn,
num_clauses as c_uint, noname())
}
}

View File

@ -925,7 +925,7 @@ fn trans_gnu_try<'a, 'tcx>(bcx: &Builder<'a, 'tcx>,
// rust_try ignores the selector.
let lpad_ty = Type::struct_(ccx, &[Type::i8p(ccx), Type::i32(ccx)],
false);
let vals = catch.landing_pad(lpad_ty, bcx.ccx.eh_personality(), 1, catch.llfn());
let vals = catch.landing_pad(lpad_ty, bcx.ccx.eh_personality(), 1);
catch.add_clause(vals, C_null(Type::i8p(ccx)));
let ptr = catch.extract_value(vals, 0);
let ptr_align = bcx.tcx().data_layout.pointer_align;

View File

@ -753,7 +753,7 @@ impl<'a, 'tcx> MirContext<'a, 'tcx> {
let llpersonality = self.ccx.eh_personality();
let llretty = self.landing_pad_type();
let lp = bcx.landing_pad(llretty, llpersonality, 1, self.llfn);
let lp = bcx.landing_pad(llretty, llpersonality, 1);
bcx.set_cleanup(lp);
let slot = self.get_personality_slot(&bcx);

View File

@ -1144,13 +1144,6 @@ extern "C" void LLVMRustWriteSMDiagnosticToString(LLVMSMDiagnosticRef D,
unwrap(D)->print("", OS);
}
extern "C" LLVMValueRef
LLVMRustBuildLandingPad(LLVMBuilderRef B, LLVMTypeRef Ty,
LLVMValueRef PersFn, unsigned NumClauses,
const char *Name, LLVMValueRef F) {
return LLVMBuildLandingPad(B, Ty, PersFn, NumClauses, Name);
}
extern "C" LLVMValueRef LLVMRustBuildCleanupPad(LLVMBuilderRef B,
LLVMValueRef ParentPad,
unsigned ArgCount,