@@ -23,7 +23,7 @@ use llvm_util;
2323use ModuleLlvm ;
2424use rustc_codegen_ssa:: { ModuleCodegen , CompiledModule } ;
2525use rustc:: util:: common:: time_ext;
26- use rustc_fs_util:: { path2cstr , link_or_copy} ;
26+ use rustc_fs_util:: { path_to_c_string , link_or_copy} ;
2727use rustc_data_structures:: small_c_str:: SmallCStr ;
2828use errors:: { self , Handler , FatalError } ;
2929use type_:: Type ;
@@ -80,7 +80,7 @@ pub fn write_output_file(
8080 output : & Path ,
8181 file_type : llvm:: FileType ) -> Result < ( ) , FatalError > {
8282 unsafe {
83- let output_c = path2cstr ( output) ;
83+ let output_c = path_to_c_string ( output) ;
8484 let result = llvm:: LLVMRustWriteOutputFile ( target, pm, m, output_c. as_ptr ( ) , file_type) ;
8585 if result. into_result ( ) . is_err ( ) {
8686 let msg = format ! ( "could not write output to {}" , output. display( ) ) ;
@@ -211,7 +211,7 @@ pub(crate) fn save_temp_bitcode(
211211 let ext = format ! ( "{}.bc" , name) ;
212212 let cgu = Some ( & module. name [ ..] ) ;
213213 let path = cgcx. output_filenames . temp_path_ext ( & ext, cgu) ;
214- let cstr = path2cstr ( & path) ;
214+ let cstr = path_to_c_string ( & path) ;
215215 let llmod = module. module_llvm . llmod ( ) ;
216216 llvm:: LLVMWriteBitcodeToFile ( llmod, cstr. as_ptr ( ) ) ;
217217 }
@@ -324,7 +324,7 @@ pub(crate) unsafe fn optimize(cgcx: &CodegenContext<LlvmCodegenBackend>,
324324
325325 if config. emit_no_opt_bc {
326326 let out = cgcx. output_filenames . temp_path_ext ( "no-opt.bc" , module_name) ;
327- let out = path2cstr ( & out) ;
327+ let out = path_to_c_string ( & out) ;
328328 llvm:: LLVMWriteBitcodeToFile ( llmod, out. as_ptr ( ) ) ;
329329 }
330330
@@ -530,7 +530,7 @@ pub(crate) unsafe fn codegen(cgcx: &CodegenContext<LlvmCodegenBackend>,
530530 || -> Result < ( ) , FatalError > {
531531 if config. emit_ir {
532532 let out = cgcx. output_filenames . temp_path ( OutputType :: LlvmAssembly , module_name) ;
533- let out = path2cstr ( & out) ;
533+ let out = path_to_c_string ( & out) ;
534534
535535 extern "C" fn demangle_callback ( input_ptr : * const c_char ,
536536 input_len : size_t ,
0 commit comments