================
@@ -448,6 +455,9 @@ BasicBlock::const_iterator 
BasicBlock::getFirstNonPHIOrDbgOrAlloca() const {
       ++InsertPt;
     }
   }
+
+  // Signal that this comes after any debug records.
+  InsertPt.setHeadBit(false);
----------------
jmorse wrote:

The other two call-sites always generate iterators with a false head bit 
anyway, but there's a path from `getFirstNonPHIIt` to this line without 
InsertPt being assigned a different iterator. `getFirstNonPHIIt` will set the 
head bit, therefore we have to explicitly clear it here to ensure the position 
is "after" any debug records.

https://github.com/llvm/llvm-project/pull/124287
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to