Skip to content

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

Merged
merged 2 commits into from
Jan 25, 2015

Conversation

michaelwoerister
Copy link
Member

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.

@rust-highfive
Copy link
Contributor

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 {
Copy link
Member

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?

Copy link
Member Author

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.

@michaelwoerister
Copy link
Member Author

@eddyb Fixed that nit.

@eddyb
Copy link
Member

eddyb commented Jan 24, 2015

@bors r+ 75ad116

@bors
Copy link
Collaborator

bors commented Jan 25, 2015

⌛ Testing commit 75ad116 with merge 1435d60...

@bors
Copy link
Collaborator

bors commented Jan 25, 2015

💔 Test failed - auto-mac-64-opt

@alexcrichton
Copy link
Member

@bors: retry

bors added a commit that referenced this pull request Jan 25, 2015
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.
@bors
Copy link
Collaborator

bors commented Jan 25, 2015

⌛ Testing commit 75ad116 with merge c80e556...

@bors
Copy link
Collaborator

bors commented Jan 25, 2015

@bors bors merged commit 75ad116 into rust-lang:master Jan 25, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants