Skip to content

Commit 4273fb1

Browse files
committed
fixup
1 parent 5003a07 commit 4273fb1

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
@@ -949,7 +949,7 @@ pub(crate) fn codegen(
949949
// binaries. So we must clone the module to produce the asm output
950950
// if we are also producing object code.
951951
let llmod = if let EmitObj::ObjectCode(_) = config.emit_obj {
952-
llvm::LLVMCloneModule(llmod)
952+
unsafe { llvm::LLVMCloneModule(llmod) }
953953
} else {
954954
llmod
955955
};

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)