[Lldb-commits] [lldb] [lldb] Use BasicBlock::iterator instead of InsertPosition (NFC) (PR #112307)
Jeremy Morse via lldb-commits
lldb-commits at lists.llvm.org
Tue Oct 15 03:57:30 PDT 2024
================
@@ -378,8 +378,8 @@ bool IRForTarget::CreateResultVariable(llvm::Function &llvm_function) {
Constant *initializer = result_global->getInitializer();
- StoreInst *synthesized_store =
- new StoreInst(initializer, new_result_global, first_entry_instruction);
+ StoreInst *synthesized_store = new StoreInst(
+ initializer, new_result_global, first_entry_instruction->getIterator());
----------------
jmorse wrote:
This is one of the more interesting use cases -- `first_entry_instruction` is initialized from the start of a block and in the "RemoveDIs" model there's ambiguity over whether the insert position is before-or-after debug records at the start of the block. However, because you're using `getFirstNonPHIOrDbg` the intention is clearly to insert after any debug records and this code is achieving that.
(No change needed)
https://github.com/llvm/llvm-project/pull/112307
More information about the lldb-commits
mailing list