Skip to content

Commit 9915a7e

Browse files
committed
fixup
1 parent 12fac33 commit 9915a7e

File tree

4 files changed

+3
-4
lines changed

4 files changed

+3
-4
lines changed

compiler/rustc_codegen_llvm/src/back/write.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -926,7 +926,7 @@ pub(crate) fn codegen(
926926
// binaries. So we must clone the module to produce the asm output
927927
// if we are also producing object code.
928928
let llmod = if let EmitObj::ObjectCode(_) = config.emit_obj {
929-
llvm::LLVMCloneModule(llmod)
929+
unsafe { llvm::LLVMCloneModule(llmod) }
930930
} else {
931931
llmod
932932
};

compiler/rustc_codegen_llvm/src/builder/gpu_device.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ fn add_unnamed_global_in_addrspace<'ll>(
1414
addrspace: u32,
1515
) -> &'ll llvm::Value {
1616
let llglobal = add_global_in_addrspace(cx, name, initializer, l, addrspace);
17-
unsafe { llvm::LLVMSetUnnamedAddress(llglobal, llvm::UnnamedAddr::Global) };
17+
llvm::LLVMSetUnnamedAddress(llglobal, llvm::UnnamedAddr::Global);
1818
llglobal
1919
}
2020

compiler/rustc_codegen_llvm/src/builder/gpu_wrapper.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ use rustc_codegen_ssa::back::write::CodegenContext;
66
use rustc_codegen_ssa::traits::BaseTypeCodegenMethods;
77

88
use crate::builder::gpu_offload::*;
9-
use crate::llvm::{self, Linkage, Type, Value, Visibility};
9+
use crate::llvm::{self, Linkage, Type, Visibility};
1010
use crate::{LlvmCodegenBackend, ModuleLlvm, SimpleCx};
1111

1212
pub(crate) fn create_struct_ty<'ll>(

compiler/rustc_codegen_llvm/src/llvm/ffi.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1005,7 +1005,6 @@ unsafe extern "C" {
10051005
) -> MetadataKindId;
10061006

10071007
// Create modules.
1008-
pub(crate) fn LLVMCloneModule(M: &Module) -> &Module;
10091008
pub(crate) fn LLVMModuleCreateWithNameInContext(
10101009
ModuleID: *const c_char,
10111010
C: &Context,

0 commit comments

Comments
 (0)