Skip to content

Commit f8627da

Browse files
authored
Fix: Update usage of i8 to c_char as exact type is platform dependent (#33)
1 parent 0ad3b17 commit f8627da

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

crates/rustc_codegen_nvvm/src/context.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ use rustc_target::spec::{HasTargetSpec, Target};
3030
use std::cell::{Cell, RefCell};
3131
use std::ffi::CStr;
3232
use std::hash::BuildHasherDefault;
33+
use std::os::raw::c_char;
3334
use std::ptr::null;
3435
use std::str::FromStr;
3536
use tracing::{debug, trace};
@@ -177,7 +178,7 @@ impl<'ll, 'tcx> CodegenCx<'ll, 'tcx> {
177178
self.fatal(&format!("{} is unsupported", thing))
178179
}
179180

180-
fn create_used_variable_impl(&self, name: *const i8, values: &[&'ll Value]) {
181+
fn create_used_variable_impl(&self, name: *const c_char, values: &[&'ll Value]) {
181182
let section = "llvm.metadata\0".as_ptr().cast();
182183
let array = self.const_array(self.type_ptr_to(self.type_i8()), values);
183184

0 commit comments

Comments
 (0)