-
Notifications
You must be signed in to change notification settings - Fork 13.4k
debuginfo: Better type description of unsized vectors and LLDB test case #21519
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
r? @eddyb (rust_highfive has picked a reviewer for you, use r? to override) |
@@ -2768,18 +2768,21 @@ fn fixed_vec_metadata<'a, 'tcx>(cx: &CrateContext<'a, 'tcx>, | |||
let element_llvm_type = type_of::type_of(cx, element_type); | |||
let (element_type_size, element_type_align) = size_and_align_of(cx, element_llvm_type); | |||
|
|||
let (array_size_in_bytes, upper_bound) = if let Some(len) = len { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this be a match
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, that would be a better fit here indeed.
08b7f17
to
75ad116
Compare
@eddyb Fixed that nit. |
@bors r+ 75ad116 |
⌛ Testing commit 75ad116 with merge 1435d60... |
💔 Test failed - auto-mac-64-opt |
@bors: retry |
Two minor improvements that have been on my TODO list for a while: * Clang uses a size of `-1` for arrays of unknown size and we should do that too as it will tell LLVM to omit the size information in debuginfo. * There was no LLDB test case for handling the optimized enum representation introduced by @luqmana. This PR finally adds one.
⌛ Testing commit 75ad116 with merge c80e556... |
Two minor improvements that have been on my TODO list for a while:
-1
for arrays of unknown size and we should do that too as it will tell LLVM to omit the size information in debuginfo.