debuginfo: Build scope map for consts#22936
Conversation
|
r? @eddyb (rust_highfive has picked a reviewer for you, use r? to override) |
|
This is fixup of #21744: it optimized |
|
My bad - but this needs a test, otherwise it could regress again. |
|
Thanks for the PR. Unfortunately this solution will lead to wrong debug locations if the same constant is referred to more than once within the same function. The scope map uses node IDs as keys and for a constant expression these are always the same, regardless of where it gets expanded to. So later occurences will overwrite scope map entries of former ones. I already have an idea how to solve this problem differently. |
|
OK, so my idea is to provide @klutzy Let me know if you have a better idea or want to implement my suggestion. Otherwise I'll implement it. |
|
@michaelwoerister I haven't have sufficient time to investigate this further, sorry. Thanks for making #23074! |
Fixes #22432.