[llvm] [Symbolize] Always use filename:line from debug info when debug info for the given address is available. (PR #128619)

David Blaikie via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 26 09:56:55 PST 2025


dwblaikie wrote:

> > Feels a bit awkward to add new virtual functions for this - when, at least I think in theory, the new virtual functions are strictly more expressivse than the old ones (so, one option would be to rename the virtual functions to add the new behavior, then add non-virtual wrapping functions that provide the old behavior under the original name).
> > But, also - maybe this isn't the level at which to make the change? Perhaps inside the DILine Info, the file/line number should be wrapped in an optional, so it's clear that neither of those things is present/valid?
> 
> Because there are so many places use those original APIs, making them to return optional requires large scale change. For the same reason, I didn't go the way to make file/line optional.

We aren't usually trying to optimize for the size of a change, within reason. (doing so tends to lead to a codebase that becomes harder to maintain over time because it lacks a unifying design)

https://github.com/llvm/llvm-project/pull/128619


More information about the llvm-commits mailing list