This repository was archived by the owner on May 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +14
-18
lines changed
compiler/rustc_codegen_llvm/src/back Expand file tree Collapse file tree 1 file changed +14
-18
lines changed Original file line number Diff line number Diff line change @@ -56,28 +56,24 @@ pub fn write_output_file<'ll>(
5656 file_type : llvm:: FileType ,
5757 self_profiler_ref : & SelfProfilerRef ,
5858) -> Result < ( ) , FatalError > {
59+ debug ! ( "write_output_file output={:?} dwo_output={:?}" , output, dwo_output) ;
5960 unsafe {
6061 let output_c = path_to_c_string ( output) ;
61- let result = if let Some ( dwo_output) = dwo_output {
62- let dwo_output_c = path_to_c_string ( dwo_output) ;
63- llvm:: LLVMRustWriteOutputFile (
64- target,
65- pm,
66- m,
67- output_c. as_ptr ( ) ,
68- dwo_output_c. as_ptr ( ) ,
69- file_type,
70- )
62+ let dwo_output_c;
63+ let dwo_output_ptr = if let Some ( dwo_output) = dwo_output {
64+ dwo_output_c = path_to_c_string ( dwo_output) ;
65+ dwo_output_c. as_ptr ( )
7166 } else {
72- llvm:: LLVMRustWriteOutputFile (
73- target,
74- pm,
75- m,
76- output_c. as_ptr ( ) ,
77- std:: ptr:: null ( ) ,
78- file_type,
79- )
67+ std:: ptr:: null ( )
8068 } ;
69+ let result = llvm:: LLVMRustWriteOutputFile (
70+ target,
71+ pm,
72+ m,
73+ output_c. as_ptr ( ) ,
74+ dwo_output_ptr,
75+ file_type,
76+ ) ;
8177
8278 // Record artifact sizes for self-profiling
8379 if result == llvm:: LLVMRustResult :: Success {
You can’t perform that action at this time.
0 commit comments