Remove unused return values from resume and cleanup_ret

Given that these instructions are diverging, not every codegen backend
may be able to produce a return value for them.
This commit is contained in:
bjorn3 2022-01-24 13:48:09 +01:00
parent 19dd2ecc2d
commit e9646fa76b
3 changed files with 13 additions and 18 deletions

View file

@ -983,8 +983,10 @@ impl<'a, 'll, 'tcx> BuilderMethods<'a, 'tcx> for Builder<'a, 'll, 'tcx> {
}
}
fn resume(&mut self, exn: &'ll Value) -> &'ll Value {
unsafe { llvm::LLVMBuildResume(self.llbuilder, exn) }
fn resume(&mut self, exn: &'ll Value) {
unsafe {
llvm::LLVMBuildResume(self.llbuilder, exn);
}
}
fn cleanup_pad(&mut self, parent: Option<&'ll Value>, args: &[&'ll Value]) -> Funclet<'ll> {
@ -1001,14 +1003,11 @@ impl<'a, 'll, 'tcx> BuilderMethods<'a, 'tcx> for Builder<'a, 'll, 'tcx> {
Funclet::new(ret.expect("LLVM does not have support for cleanuppad"))
}
fn cleanup_ret(
&mut self,
funclet: &Funclet<'ll>,
unwind: Option<&'ll BasicBlock>,
) -> &'ll Value {
let ret =
unsafe { llvm::LLVMRustBuildCleanupRet(self.llbuilder, funclet.cleanuppad(), unwind) };
ret.expect("LLVM does not have support for cleanupret")
fn cleanup_ret(&mut self, funclet: &Funclet<'ll>, unwind: Option<&'ll BasicBlock>) {
unsafe {
llvm::LLVMRustBuildCleanupRet(self.llbuilder, funclet.cleanuppad(), unwind)
.expect("LLVM does not have support for cleanupret");
}
}
fn catch_pad(&mut self, parent: &'ll Value, args: &[&'ll Value]) -> Funclet<'ll> {