diff options
| author | Gary Guo <gary@garyguo.net> | 2023-04-07 20:11:19 +0100 |
|---|---|---|
| committer | Gary Guo <gary@garyguo.net> | 2023-05-07 12:38:47 +0100 |
| commit | 97926360e755547dc4663ab75af1e37e9a68e58b (patch) | |
| tree | 2899076ff62cee8cab97ba875db8aaeaf3cd5f90 /compiler/rustc_codegen_llvm/src/builder.rs | |
| parent | ecd04fd1b553c06e3e48c0f8485de46758e51636 (diff) | |
| download | rust-97926360e755547dc4663ab75af1e37e9a68e58b.tar.gz rust-97926360e755547dc4663ab75af1e37e9a68e58b.zip | |
Fix num reserved clauses for landing pad
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/builder.rs')
| -rw-r--r-- | compiler/rustc_codegen_llvm/src/builder.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_codegen_llvm/src/builder.rs b/compiler/rustc_codegen_llvm/src/builder.rs index 10da8cc4c25..4d0bcd53d15 100644 --- a/compiler/rustc_codegen_llvm/src/builder.rs +++ b/compiler/rustc_codegen_llvm/src/builder.rs @@ -985,7 +985,7 @@ impl<'a, 'll, 'tcx> BuilderMethods<'a, 'tcx> for Builder<'a, 'll, 'tcx> { fn cleanup_landing_pad(&mut self, pers_fn: &'ll Value) -> (&'ll Value, &'ll Value) { let ty = self.type_struct(&[self.type_i8p(), self.type_i32()], false); - let landing_pad = self.landing_pad(ty, pers_fn, 1 /* FIXME should this be 0? */); + let landing_pad = self.landing_pad(ty, pers_fn, 0); unsafe { llvm::LLVMSetCleanup(landing_pad, llvm::True); } @@ -994,7 +994,7 @@ impl<'a, 'll, 'tcx> BuilderMethods<'a, 'tcx> for Builder<'a, 'll, 'tcx> { fn filter_landing_pad(&mut self, pers_fn: &'ll Value) -> (&'ll Value, &'ll Value) { let ty = self.type_struct(&[self.type_i8p(), self.type_i32()], false); - let landing_pad = self.landing_pad(ty, pers_fn, 1 /* FIXME should this be 0? */); + let landing_pad = self.landing_pad(ty, pers_fn, 1); self.add_clause(landing_pad, self.const_array(self.type_i8p(), &[])); (self.extract_value(landing_pad, 0), self.extract_value(landing_pad, 1)) } |
