Use safe FFI for various functions in codegen_llvm
This commit is contained in:
parent
bb029a1d3f
commit
a54bfcf52b
2 changed files with 3 additions and 7 deletions
|
@ -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) {
|
||||
|
|
|
@ -1204,7 +1204,7 @@ unsafe extern "C" {
|
|||
pub(crate) fn LLVMGetCurrentDebugLocation2<'a>(Builder: &Builder<'a>) -> Option<&'a Metadata>;
|
||||
|
||||
// Terminators
|
||||
pub(crate) fn LLVMBuildRetVoid<'a>(B: &Builder<'a>) -> &'a Value;
|
||||
pub(crate) safe fn LLVMBuildRetVoid<'a>(B: &Builder<'a>) -> &'a Value;
|
||||
pub(crate) fn LLVMBuildRet<'a>(B: &Builder<'a>, V: &'a Value) -> &'a Value;
|
||||
pub(crate) fn LLVMBuildBr<'a>(B: &Builder<'a>, Dest: &'a BasicBlock) -> &'a Value;
|
||||
pub(crate) fn LLVMBuildCondBr<'a>(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue