Skip to content
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

[debuginfo] Use byte pos instead of char pos for lineinfo column index #67360

Closed
bjorn3 opened this issue Dec 16, 2019 · 2 comments · Fixed by #69357
Closed

[debuginfo] Use byte pos instead of char pos for lineinfo column index #67360

bjorn3 opened this issue Dec 16, 2019 · 2 comments · Fixed by #69357
Labels
A-debuginfo Area: Debugging information in compiled programs (DWARF, PDB, etc.) C-enhancement Category: An issue proposing an enhancement or a PR with one. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@bjorn3
Copy link
Member

bjorn3 commented Dec 16, 2019

Context: https://zulip-archive.rust-lang.org/187780tcompilerwgllvm/51206DWARFdebuglinecolumnandutf8.html

This is the same both gcc and clang are using. It is also a bit faster as there is no need to convert the BytePos from the Span to a CharPos.

@bjorn3
Copy link
Member Author

bjorn3 commented Dec 16, 2019

@rustbot modify labels: +A-debuginfo

@rustbot rustbot added the A-debuginfo Area: Debugging information in compiled programs (DWARF, PDB, etc.) label Dec 16, 2019
@bjorn3
Copy link
Member Author

bjorn3 commented Dec 16, 2019

let loc = span_start(bx.cx(), span);

The span_start is responsible for creating a CharPos.

@jonas-schievink jonas-schievink added C-enhancement Category: An issue proposing an enhancement or a PR with one. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Dec 16, 2019
@bors bors closed this as completed in 62c0579 Mar 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-debuginfo Area: Debugging information in compiled programs (DWARF, PDB, etc.) C-enhancement Category: An issue proposing an enhancement or a PR with one. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants