Use safe FFI for various functions in codegen_llvm

This commit is contained in:
Oli Scherer
2025-02-21 17:23:49 +00:00
parent bb029a1d3f
commit a54bfcf52b
2 changed files with 3 additions and 7 deletions

View File

@@ -100,9 +100,7 @@ impl<'a, 'll, CX: Borrow<SimpleCx<'ll>>> GenericBuilder<'a, 'll, CX> {
}
fn ret_void(&mut self) {
unsafe {
llvm::LLVMBuildRetVoid(self.llbuilder);
}
llvm::LLVMBuildRetVoid(self.llbuilder);
}
fn ret(&mut self, v: &'ll Value) {
@@ -293,9 +291,7 @@ impl<'a, 'll, 'tcx> BuilderMethods<'a, 'tcx> for Builder<'a, 'll, 'tcx> {
}
fn ret_void(&mut self) {
unsafe {
llvm::LLVMBuildRetVoid(self.llbuilder);
}
llvm::LLVMBuildRetVoid(self.llbuilder);
}
fn ret(&mut self, v: &'ll Value) {