Skip to content

Commit d658744

Browse files
committed
Use type_ptr_to_ext
1 parent 02f1736 commit d658744

File tree

1 file changed

+1
-2
lines changed
  • crates/rustc_codegen_nvvm/src

1 file changed

+1
-2
lines changed

crates/rustc_codegen_nvvm/src/ty.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,7 @@ impl<'ll> CodegenCx<'ll, '_> {
115115
TypeKind::Function,
116116
"don't call ptr_to on function types, use ptr_to_llvm_type on FnAbi instead or explicitly specify an address space if it makes sense"
117117
);
118-
119-
unsafe { llvm::LLVMPointerType(ty, AddressSpace::DATA.0) }
118+
self.type_ptr_to_ext(ty, AddressSpace::DATA)
120119
}
121120

122121
pub(crate) fn type_ptr_to_ext(&self, ty: &'ll Type, address_space: AddressSpace) -> &'ll Type {

0 commit comments

Comments
 (0)