File tree 1 file changed +14
-18
lines changed
compiler/rustc_codegen_llvm/src/back
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>(
56
56
file_type : llvm:: FileType ,
57
57
self_profiler_ref : & SelfProfilerRef ,
58
58
) -> Result < ( ) , FatalError > {
59
+ debug ! ( "write_output_file output={:?} dwo_output={:?}" , output, dwo_output) ;
59
60
unsafe {
60
61
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 ( )
71
66
} 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 ( )
80
68
} ;
69
+ let result = llvm:: LLVMRustWriteOutputFile (
70
+ target,
71
+ pm,
72
+ m,
73
+ output_c. as_ptr ( ) ,
74
+ dwo_output_ptr,
75
+ file_type,
76
+ ) ;
81
77
82
78
// Record artifact sizes for self-profiling
83
79
if result == llvm:: LLVMRustResult :: Success {
You can’t perform that action at this time.
0 commit comments