Skip to content

Commit 9792636

Browse files
committed
Fix num reserved clauses for landing pad
1 parent ecd04fd commit 9792636

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

compiler/rustc_codegen_llvm/src/builder.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -985,7 +985,7 @@ impl<'a, 'll, 'tcx> BuilderMethods<'a, 'tcx> for Builder<'a, 'll, 'tcx> {
985985

986986
fn cleanup_landing_pad(&mut self, pers_fn: &'ll Value) -> (&'ll Value, &'ll Value) {
987987
let ty = self.type_struct(&[self.type_i8p(), self.type_i32()], false);
988-
let landing_pad = self.landing_pad(ty, pers_fn, 1 /* FIXME should this be 0? */);
988+
let landing_pad = self.landing_pad(ty, pers_fn, 0);
989989
unsafe {
990990
llvm::LLVMSetCleanup(landing_pad, llvm::True);
991991
}
@@ -994,7 +994,7 @@ impl<'a, 'll, 'tcx> BuilderMethods<'a, 'tcx> for Builder<'a, 'll, 'tcx> {
994994

995995
fn filter_landing_pad(&mut self, pers_fn: &'ll Value) -> (&'ll Value, &'ll Value) {
996996
let ty = self.type_struct(&[self.type_i8p(), self.type_i32()], false);
997-
let landing_pad = self.landing_pad(ty, pers_fn, 1 /* FIXME should this be 0? */);
997+
let landing_pad = self.landing_pad(ty, pers_fn, 1);
998998
self.add_clause(landing_pad, self.const_array(self.type_i8p(), &[]));
999999
(self.extract_value(landing_pad, 0), self.extract_value(landing_pad, 1))
10001000
}

0 commit comments

Comments
 (0)