[Lldb-commits] [lldb] [llvm] [NFC][DebugInfo] Make some block-start-position methods return iterators (PR #124287)

Harald van Dijk via lldb-commits lldb-commits at lists.llvm.org
Wed Feb 5 03:02:32 PST 2025


hvdijk wrote:

Thanks again, it ends up looking much better (IMO) with `InsertPosition`, and it manages to avoid the change on the users' side that I was hoping to avoid. https://github.com/hvdijk/llvm-project/commit/dibuilder-insertposition Since this allows us to have a single method rather than separate overloads (since `InsertPostion` handles both `Instruction *` arguments and `BasicBlock *` arguments via conversion) it also avoids the need for duplication in the unit testing. TODO (feedback welcome): Figure out what to do with the C API. In my commit, it compiles with a deprecation warning, but it's providing an interface for doing the exact thing that is meant to be deprecated, and the interface is inconsistent with how instructions are inserted through the C API, so my thinking is that this API should probably be replaced with one that uses `IRBuilder`?

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


More information about the lldb-commits mailing list