================
@@ -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
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to