[lldb] [llvm] [NFC][DebugInfo] Make some block-start-position methods return iterators (PR #124287)
Jeremy Morse via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 27 08:06:04 PST 2025
================
@@ -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
More information about the llvm-commits
mailing list