Skip to content

Commit 78c7faf

Browse files
committed
Fix: libc::c_char is not always i8
1 parent 9f1ead8 commit 78c7faf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/librustc_trans/back/lto.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ pub fn run(sess: &session::Session, llmod: ModuleRef,
142142
let cstrs: Vec<CString> = reachable.iter().map(|s| {
143143
CString::from_slice(s.as_bytes())
144144
}).collect();
145-
let arr: Vec<*const i8> = cstrs.iter().map(|c| c.as_ptr()).collect();
145+
let arr: Vec<*const libc::c_char> = cstrs.iter().map(|c| c.as_ptr()).collect();
146146
let ptr = arr.as_ptr();
147147
unsafe {
148148
llvm::LLVMRustRunRestrictionPass(llmod,

0 commit comments

Comments
 (0)