We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 5d85a71 + 6f92951 commit 7d28bf1Copy full SHA for 7d28bf1
compiler/rustc_codegen_llvm/src/debuginfo/metadata.rs
@@ -643,10 +643,10 @@ fn create_file<'ll>(
643
builder,
644
file_name.as_c_char_ptr(),
645
file_name.len(),
646
- directory.as_c_char_ptr(),
+ if directory.is_empty() { ptr::null() } else { directory.as_c_char_ptr() },
647
directory.len(),
648
hash_kind,
649
- hash_value.as_c_char_ptr(),
+ if hash_value.is_empty() { ptr::null() } else { hash_value.as_c_char_ptr() },
650
hash_value.len(),
651
source.map_or(ptr::null(), |x| x.as_c_char_ptr()),
652
source.map_or(0, |x| x.len()),
0 commit comments