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

Harald van Dijk via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 28 04:52:03 PST 2025


hvdijk wrote:

Hi, in principle this change makes sense but it causes a bit of an issue with [`DIBuilder`](https://llvm.org/doxygen/classllvm_1_1DIBuilder.html) not yet having been updated to take iterators. The workaround for that at the moment is trivial (change e.g. `DIB.insertDeclare(..., BB.getFirstNonPHIOrDbg())` to `DIB.insertDeclare(..., &*BB.getFirstNonPHIOrDbg())` as you do in other places in this PR), but that workaround would break when the update does land to have `insertDeclare` etc. take iterators. Could I ask what the best way forward here is for downstream users that need to remain compatible with multiple LLVM versions? Is it better to make this change in downstream projects, or would we be able to update `DIBuilder` quickly enough that we can avoid that?

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


More information about the llvm-commits mailing list