[Lldb-commits] [lldb] [llvm] [NFC][DebugInfo] Make some block-start-position methods return iterators (PR #124287)
Jeremy Morse via lldb-commits
lldb-commits at lists.llvm.org
Tue Feb 4 06:26:11 PST 2025
jmorse wrote:
Indeed, that's a pattern we've seen elsewhere in the instruction APIs -- you can select whether you want an instruction inserted into a block or not by whether you pass an instruction pointer or nullptr in. However, without a common "no-such-location" instruction iterator (or by making the argument std::optional) we can't replicate that with the new APIs.
For things like the instruction constructor APIs we've used overloads, and forced users who don't want instruction insertion to call a function without an insertion location argument. Here, we'd have a `insertDbgValueIntrinsic` function without the InsertBefore argument for users to call -- that would preserve the generality, however it wouldn't solve your backwards-compatibility objectives. If that's the case, there might be nothing we can do about that here.
https://github.com/llvm/llvm-project/pull/124287
More information about the lldb-commits
mailing list