Skip to content

Conversation

@redstar
Copy link
Member

@redstar redstar commented Apr 26, 2015

Debug info for nested local variables must be created for each
function (with different address expression). The resulting
debug info was not stored per function which resulted in the
use of the last created debug info even if it was wrong.

This commit fixes the bug and the current assertion with LLVM 3.7.

Debug info for nested local variables must be created for each
function (with different address expression). The resulting
debug info was not stored per function which resulted in the
use of the last created debug info even if it was wrong.

This commit fixes the bug and the current assertion with LLVM 3.7.
@dnadlinger
Copy link
Member

To me, it'd seem more natural to store a map from declarations to DIVariables in IrFunction, but I guess the two approaches should be roughly equivalent as long as the code is not really hot. I'd then also use a llvm::DenseMap or something like that, but I'm probably taking my dislike for std::map a bit too far. ;)

@redstar redstar merged commit 28407c6 into ldc-developers:master Apr 26, 2015
@redstar
Copy link
Member Author

redstar commented Apr 27, 2015

Yes, I also think that IrVar is not the best choice for the mapping. But it was the simple way to fix the bug. I try a refactoring soon. Some kind of hashmap would be better than std::map. I'll have a look at llvm::DenseMap.

@redstar redstar deleted the debugvar branch April 27, 2015 21:20
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.

2 participants